Merge branch '2512_usermenu_fix'

* 2512_usermenu_fix:
  replaced #interactive to #silent into misc/macros.d/*
  changed mcedit.1.in. replaced directive #interactive to #silent.
  Ticket #2512 (fixup for usermenu)
This commit is contained in:
Ilia Maslakov 2011-03-17 20:22:01 +00:00
commit 7e87dd7024
10 changed files with 12 additions and 6 deletions

View File

@ -139,8 +139,8 @@ for more detail about format of the script.
.PP .PP
Following macro definition and directives can be used: Following macro definition and directives can be used:
.TP .TP
.I #interactive .I #silent
If this directive is set, then script starts in subshell. If this directive is set, then script starts without interactive subshell.
.TP .TP
.I %c .I %c
The cursor column position number. The cursor column position number.

View File

@ -1,4 +1,3 @@
#interactive
m make m make
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
make 2> $TMPFILE make 2> $TMPFILE

View File

@ -1,3 +1,4 @@
#silent
u Upper case selection u Upper case selection
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE cat %b > $TMPFILE

View File

@ -1,3 +1,4 @@
#silent
l Lower case selection l Lower case selection
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE cat %b > $TMPFILE

View File

@ -1,3 +1,4 @@
#silent
S Sort selection S Sort selection
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE cat %b > $TMPFILE

View File

@ -1,2 +1,3 @@
#silent
t Indent `C' formatter t Indent `C' formatter
indent -gnu -fc1 -i4 -bli0 -nut -bap -l100 %b 1>/dev/null 2> %e indent -gnu -fc1 -i4 -bli0 -nut -bap -l100 %b 1>/dev/null 2> %e

View File

@ -1,3 +1,4 @@
#silent
s snippets s snippets
a=`cat %b` a=`cat %b`
if [ "$a" = "fori" ]; then if [ "$a" = "fori" ]; then

View File

@ -1,3 +1,4 @@
#silent
e execute something e execute something
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE cat %b > $TMPFILE

View File

@ -1,3 +1,4 @@
#silent
w delete trailing whitespace w delete trailing whitespace
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE cat %b > $TMPFILE

View File

@ -868,7 +868,7 @@ user_menu_cmd (struct WEdit *edit_widget, const char *menu_file, int selected_en
int selected, old_patterns; int selected, old_patterns;
Listbox *listbox; Listbox *listbox;
gboolean res = FALSE; gboolean res = FALSE;
gboolean interactive = FALSE; gboolean interactive = TRUE;
if (!vfs_current_is_local ()) if (!vfs_current_is_local ())
{ {
@ -956,8 +956,8 @@ user_menu_cmd (struct WEdit *edit_widget, const char *menu_file, int selected_en
if (*p == '#') if (*p == '#')
{ {
/* show prompt if first line of external script is #interactive */ /* show prompt if first line of external script is #interactive */
if (selected_entry >= 0 && strncmp (p, "#interactive", 12) == 0) if (selected_entry >= 0 && strncmp (p, "#silent", 7) == 0)
interactive = TRUE; interactive = FALSE;
/* A commented menu entry */ /* A commented menu entry */
accept_entry = 1; accept_entry = 1;
} }