@theevilbit@yo_yo_yo_jbo The point of `sudo -s` is to run the _current user’s_ shell env with elevated privileges. In this case it ‘behaves as expected,’ even though you might not be aware what is happening.
@theevilbit@yo_yo_yo_jbo When you run `sudo <command>` the `~/.zsh*` files are not re-evaluated. But when you run `sudo <zshscript>`, the zsh interpreting the script _will_ load `~/.zshenv` again with elevated privs. I think this is ‘behavior as documented’ but very concerning. (I wasn’t aware of this.)
May 6, 2020 • 9 tweets • 9 min read
You can use arrow keys to move the cursor in macOS Terminal.
Left and right arrow will move left and right by character.
Option-left and right arrow will move by word.
ctrl-A moves to the beginning of the prompt and ctrl-E moves to the end. 1/20
#macOS#Terminal#protip
When you want more memorable Keystrokes you can create your own in the ‘Keyboard’ tab of the ‘Profiles’ area of Terminal Preferences. 2/20