diff options
author | Jari Aalto <jari.aalto@cante.net> | 1999-02-19 17:11:39 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:52 +0000 |
commit | b72432fdcc59300c6fe7c9d6c8a31ad3447933f5 (patch) | |
tree | b9899162338c2ff3fd83a8aef8831cb119e85cd7 /examples/scripts | |
parent | bc4cd23ce958feda898c618215f94d8a4e8f4ffa (diff) | |
download | android_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.tar.gz android_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.tar.bz2 android_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.zip |
Imported from ../bash-2.03.tar.gz.
Diffstat (limited to 'examples/scripts')
-rwxr-xr-x | examples/scripts/adventure.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/scripts/adventure.sh b/examples/scripts/adventure.sh index a6d2eaa..4e22393 100755 --- a/examples/scripts/adventure.sh +++ b/examples/scripts/adventure.sh @@ -90,6 +90,11 @@ ash_lk(){ echo " $1 " | fgrep " $2 " >&- 2>&-; } ash_pr(){ echo $* | tr ' ' '\012' | pr -5 -t -w75 -l$[ ( $# + 4 ) / 5 ]; } ash_rm(){ echo " $1 " | sed -e "s/ $2 / /" -e 's/^ //' -e 's/ $//'; } +# enable history, bang history expansion, and emacs editing +set -o history +set -o histexpand +set -o emacs + cd LIM=.limbo # $HOME/$LIM contains "destroyed" objects mkdir $LIM >&- 2>&- @@ -164,8 +169,7 @@ do room=`pwd` prev=$room fi - echo -n '-advsh> ' # prompt - read verb obj x + read -e -p '-advsh> ' verb obj x # prompt is '-advsh> ' if [ $? != 0 ] then verb=quit # EOF fi |