Clever history doesn't really work for me when I use `sudo` say I type $ sudo pacman -Syu $ sudo chown blah blah $ sudo pa I just get `sudo chown blah blah` instead of `sudo pacman -Syu` Does anybody know how to fix this? :)
My favourite Zsh features
41–44 of 44 posts
Re: My favourite Zsh features
#42Re: My favourite Zsh features
#43Earlier quoted context omitted.
How do you get a menu like in the second screenshot in bash?
There is no such menu (tried it on CentOS and OS X). It simply lists the available directories.
For menu complete with bash, the easiest is to add:
TAB menu-complete
inside of "~/.inputrc" then start a new shell to test it. Thats because it uses readline to handle command line (and inputrc configures readline).
Note: im not saying the experience is not better in zsh, just that both can do all this stuff. ive been switching between zsh and bash quite a few times myself over the last decade and use bash daily most of the time lately.
In my eyes:
zsh:
- nice and neat to configure/less bloat maybe
- powerful scripting language
- some scripting syntax requires zsh so when you get used to that... you write non-portable stuff ;)
bash:
- does approx everything zsh does and some more
- scripting language works everywhere because everyone has default to bash
- scripting language is slightly less powerful than zsh in some ways
- configuration is a little more all over the place (just like the .inputrc above)
Thus, all things considered, and given the improvements in bash over the last past .. 5 years or so - i'm using bash more often even thus zsh is also a very nice shell.
Re: My favourite Zsh features
#44Clever history doesn't really work for me when I use `sudo` say I type $ sudo pacman -Syu $ sudo chown blah blah $ sudo pa I just get `sudo chown blah blah` instead of `sudo pacman -Syu` Does anybody know how to fix this? :)
Even better is the function in Functions/Zle/up-line-or-beginning-search To use that, you need to first do: autoload -U up-line-or-beginning-search zle -N up-line-or-beginning-search