You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would someone point me to some documentation that says when set -o emacs is active, a hash as the first character of a line is not a comment but is instead a search command?
I'm sorry, it sounds elementary and stupid, but ksh93u and ksh93u+m behave exactly the same on the Mac and both behave the same and do NOT do the same thing on a Linux VM with exactly the same rc files.
With no rc file at all they both still do it on the Mac. Two different Mac. Catalina 10.15.7.
[618] mbp13 $ ENV=/dev/null ksh
$ set -o emacs
$ history
51 exit
52 set
53 exit
54 set
55 # test
56 set -o emacs
57 set
58 /bin/ksh
59 set -o
60 set +o emacs
61 set -o emacs
62 #s
63 echo $HISTFILE
64 mg .kshrc
65 set -o emacs
66 history
$ #s
1) set -o emacs
2) set +o emacs
3) set -o
4) set
I typed #s at the prompt.
If the input is <space>#<some_text> , it's taken as a comment. If you type some text and then use ESC-# , the shell prepends a hash and moves to the next line. It adds that line to the history and if you bring it back with an up-arrow it tries to intrepret the hash as a search command again.