mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Added two macro examples:
* macro.6.sh - execute selected block * macro.7.sh - delete trailing whitespaces Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
parent
bdf5543950
commit
bc3c848ab1
@ -5,7 +5,9 @@ macro_DATA = \
|
||||
macro.1.sh \
|
||||
macro.3.sh \
|
||||
macro.4.sh \
|
||||
macro.5.sh
|
||||
macro.5.sh \
|
||||
macro.6.sh \
|
||||
macro.7.sh
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(macro_DATA)
|
||||
|
4
misc/macros.d/macro.6.sh
Normal file
4
misc/macros.d/macro.6.sh
Normal file
@ -0,0 +1,4 @@
|
||||
e execute something
|
||||
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
|
||||
cat %b > $TMPFILE
|
||||
sh $TMPFILE > %b
|
4
misc/macros.d/macro.7.sh
Normal file
4
misc/macros.d/macro.7.sh
Normal file
@ -0,0 +1,4 @@
|
||||
w delete trailing whitespace
|
||||
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
|
||||
cat %b > $TMPFILE
|
||||
cat $TMPFILE | sed 's/[ \t]*$//' > %b
|
Loading…
Reference in New Issue
Block a user