mirror of https://github.com/MidnightCommander/mc
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:
commit
7e87dd7024
|
@ -139,8 +139,8 @@ for more detail about format of the script.
|
|||
.PP
|
||||
Following macro definition and directives can be used:
|
||||
.TP
|
||||
.I #interactive
|
||||
If this directive is set, then script starts in subshell.
|
||||
.I #silent
|
||||
If this directive is set, then script starts without interactive subshell.
|
||||
.TP
|
||||
.I %c
|
||||
The cursor column position number.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#interactive
|
||||
m make
|
||||
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
|
||||
make 2> $TMPFILE
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#silent
|
||||
u Upper case selection
|
||||
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
|
||||
cat %b > $TMPFILE
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#silent
|
||||
l Lower case selection
|
||||
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
|
||||
cat %b > $TMPFILE
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#silent
|
||||
S Sort selection
|
||||
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
|
||||
cat %b > $TMPFILE
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#silent
|
||||
t Indent `C' formatter
|
||||
indent -gnu -fc1 -i4 -bli0 -nut -bap -l100 %b 1>/dev/null 2> %e
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#silent
|
||||
s snippets
|
||||
a=`cat %b`
|
||||
if [ "$a" = "fori" ]; then
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#silent
|
||||
e execute something
|
||||
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
|
||||
cat %b > $TMPFILE
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#silent
|
||||
w delete trailing whitespace
|
||||
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
|
||||
cat %b > $TMPFILE
|
||||
|
|
|
@ -868,7 +868,7 @@ user_menu_cmd (struct WEdit *edit_widget, const char *menu_file, int selected_en
|
|||
int selected, old_patterns;
|
||||
Listbox *listbox;
|
||||
gboolean res = FALSE;
|
||||
gboolean interactive = FALSE;
|
||||
gboolean interactive = TRUE;
|
||||
|
||||
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 == '#')
|
||||
{
|
||||
/* show prompt if first line of external script is #interactive */
|
||||
if (selected_entry >= 0 && strncmp (p, "#interactive", 12) == 0)
|
||||
interactive = TRUE;
|
||||
if (selected_entry >= 0 && strncmp (p, "#silent", 7) == 0)
|
||||
interactive = FALSE;
|
||||
/* A commented menu entry */
|
||||
accept_entry = 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue