Something I've noticed is that osx users believe bash to be less capable than it is because of the poor out of the box configuration of bash on that platform (in addition to the ancient version installed). Particularly the tab completion stuff. It doesn't pop up menus and all that, but the ubuntu install of bash has a ton of context-sensitive tab completion stuff in it, and the git package properly installs __git_ps1…
My favourite Zsh features
11–20 of 44 posts
Re: My favourite Zsh features
#12I feel lost without it, more than the tab completion.
Re: My favourite Zsh features
#13https://github.com/everett1992/dotfiles/blob/master/home/.zs...
I have noticed that zsh's globbing is greedy.
`grep ^foo *` tries to expand ^foo when bash would pass it as a string to grep.Re: My favourite Zsh features
#14 alias -g L=' | less '
which allows me to simply append "L" to a line to pipe the output to less. ls L
The pattern of short all-caps global aliases for ' | command 's make building/editing pipelines really easy/fast. alias -g C=' | wc -l '
alias -g A=' | ack-grep '
alias -g S=' | sort '
alias -g JQL=' | jq -C | less'
ls **/*png L
ls **/*png A -v regex C
curl $site JQL
puttingbindkey '^g' _expand_alias
in your zshrc allows you to expand aliases with
You can find more global aliases and tips at: http://grml.org/zsh/zsh-lovers.html
Re: My favourite Zsh features
#15Re: My favourite Zsh features
#16bash only needs better history manipulation. absolutely nothing else. all those z shell features the only useful one (i.e. the only one that's impossible on bash) is the recursion (i typed star star, but hn hides it) hack. and it's awful. because now you just learned something that you can't use anywhere else! and to search that same way in a shell script? though luck. also it has less parameter then find. and find i…
Re: My favourite Zsh features
#17Re: My favourite Zsh features
#18bash only needs better history manipulation. absolutely nothing else. all those z shell features the only useful one (i.e. the only one that's impossible on bash) is the recursion (i typed star star, but hn hides it) hack. and it's awful. because now you just learned something that you can't use anywhere else! and to search that same way in a shell script? though luck. also it has less parameter then find. and find i…
$ echo **/*.txt
Of course if you're using an ancient version of bash, you're out of luck. $ bash --version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
GNU bash, version 4.1.13(7)-release (x86_64-unknown-cygwin)Re: My favourite Zsh features
#19The up arrow to go back in history matching the partial command I typed is has become essential to me. I feel lost without it, more than the tab completion.
Zsh would probably be worth using, except for the fact that bash is almost everywhere, and I already know it very well. It's a tough one to call.
Re: My favourite Zsh features
#20A killer feature not listed here is global aliases. These are aliases that can be anywhere in a line. The most use I get out of this is from having alias -g L=' | less ' which allows me to simply append "L" to a line to pipe the output to less. ls L The pattern of short all-caps global aliases for ' | command 's make building/editing pipelines really easy/fast. alias -g C=' | wc -l ' alias -g A=' | ack-grep ' alias -…