From 0afebdd778026979d5e5c7d8efc464d5a7f57c06 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Thu, 22 Jan 2015 12:08:10 +0200 Subject: [PATCH] new feat to markslider: autoexec --- mvregex | 14 +++++++++----- reporting/markslider | 5 +++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/mvregex b/mvregex index 6bb406d..29c9d6f 100755 --- a/mvregex +++ b/mvregex @@ -1,11 +1,15 @@ #!/bin/bash +function helpexit() { + echo rename files in current folder replacing arg1 with arg2. + echo '-n for match non ascii, replace with arg2' + exit +} + IFS=$'\n' -if [ -z "$1" ] -then echo rename files in current folder replacing arg1 with arg2. - echo '-n for match non ascii, replace with arg2' - exit -fi +[[ -z "$1" ]] && helpexit +[[ "$1" = "-h" ]] && helpexit + POSTPROC="sed 's, , -> ,'" which ncsv &>/dev/null && POSTPROC="ncsv -c" c=0 diff --git a/reporting/markslider b/reporting/markslider index 0fff45f..4960150 100755 --- a/reporting/markslider +++ b/reporting/markslider @@ -109,6 +109,7 @@ do LINES=$( tput lines ) [ "$cmd" = "e" ] && read -N 1 foo display_slide "$1" $i + # save cursor location echo -ne "${E}s" # ask for user input @@ -121,6 +122,7 @@ do echo -ne "${E}1B${E}3Dq:x" echo -ne "${E}1B${E}3Dm:▲${E}4A" } + [[ -z "$MARKSLIDER_AUTOEXEC" ]] || slide_exec "$1" $i read -s -N 1 cmd # Escape inputed if arrow keys used [ "$cmd" = "" ] && read -s -N 2 cmd @@ -244,6 +246,9 @@ $( gnuplot -e "set term dumb 60 15 enhanced; set parametric; set trange [0:10*pi &( xeyes ) $( ls ) $( echo You can hide commands too... )Hidden command + * Commands are auto-run, if MARKSLIDER_AUTOEXEC=true + ${H}${R}NOTE: This setting is potentially dangerous, don't view anyones + presentations but yours with the setting!${Z} # Hints: Other tools