On iTerm2 by default the Option key is mapped to, well, Option itself, as to type special symbols. That doesn't make much sense as in a terminal emulator you probably want to send keyboard shortcut signals rather than fancy signs.
Hence the remapping option of Left/Right Option keys to Meta or Esc+. But why not just Meta alone? Why does Esc have to do with anything?
It turns out that Meta and Esc are equivalent. But why the redundancy? I Googled quite a bit but findings are limited.
https://www.gnu.org/software/emacs/manual/html_node/emacs/User-Input.html states that "this feature is useful on certain text terminals where the <Meta> key does not function reliably".
https://books.google.com/books?id=P_jCDAAAQBAJ&pg=PA73 states that "this alternative way of using <Meta> was created because, at one time, there were keyboards that didn't have a Meta key or an Alt key".
http://ergoemacs.org/emacs/modernization_meta_key.html is also a good reference for you to understand that keyboards don't always look the way they do today.
At least one can finally make sense out of the redundancy. Relieved, right?
2019年10月20日星期日
Setting non-standard shell as login shell
Bash that is shipped with macOS is pretty old, at least as of Mojave. If you've installed a modern version through Homebrew, you probably need to configure it as your login shell, to save you some troubles with Terminal, iTerm or tmux. This is the way:
sudo chsh -s $(which bash) $(whoami)
Rationale (especially the part how /etc/shells is not touched for sanity reasons):
https://superuser.com/a/48229
sudo chsh -s $(which bash) $(whoami)
Rationale (especially the part how /etc/shells is not touched for sanity reasons):
https://superuser.com/a/48229
Update 2023: I guess history does repeat itself! I ran into this issue again the other day and totally had forgotten I had had this experience before and even the existence of this very blog post. I managed to figure it out from the man page though, which reads:
When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.
订阅:
评论 (Atom)