handle executables anywhere on line

This commit is contained in:
ville rantanen
2014-05-20 21:09:33 +03:00
parent 4d6f25c631
commit 94ffa25e72

View File

@@ -40,7 +40,7 @@ function slide_exec {
!/^# /{
print $0;
}
' "$1" | sed -n '/^'$2'# /,/^'$j'# /p' | grep "^\&( " | sed -e 's,^\&( ,,' -e 's,)$,,' )
' "$1" | sed -n '/^'$2'# /,/^'$j'# /p' | grep "\&(.*)" | sed -e 's,[^\&]*\&( ,,' -e 's,)[^)]*,,' )
# restore cursor position to bottom of slide
echo -ne "${E}u"
while read line
@@ -53,7 +53,7 @@ function slide_exec {
!/^# /{
print $0;
}
' "$1" | sed -n '/^'$2'# /,/^'$j'# /p' | grep "^\$( " | sed -e 's,^\$( ,,' -e 's,)$,,' )
' "$1" | sed -n '/^'$2'# /,/^'$j'# /p' | grep "\$(.*)" | sed -e 's,[^\$]*\$( ,,' -e 's, )[^)]*,,' )
}
@@ -236,6 +236,7 @@ Object Area Perimeter
&( xeyes )
$( ls )
$( echo You can hide commands too... )Hidden command
# Hints: Other tools
@@ -257,7 +258,7 @@ $( ls )
_jgs______/_ __ \__________
| |
| MarkSlider |
|___________________________|
|___________________________|
# Hints: More tools
* JPEG to ascii: jp2a