by joejag on 11/15/14, 2:52 PM with 43 comments
by stormbrew on 11/15/14, 5:18 PM
This is not to say that zsh doesn't have a lot more features, just that the comparison from the perspective of an osx user tends to be a lot more stark.
by justinmayer on 11/15/14, 8:02 PM
I wrote a tutorial on how to install it on Mac OS X and Ubuntu: http://hackercodex.com/guide/install-fish-shell-mac-ubuntu/ For me, the chief advantage to Fish is that you get more functionality out-of-the-box than with most other shells, including zsh.
I also published two related projects for easily sharing Fish shell enhancements — Tacklebox https://github.com/justinmayer/tacklebox and Tackle https://github.com/justinmayer/tackle) — because I wanted a way for folks to be able to have access to multiple plugin repositories and easily share their favorite shell snippets.
by kstock on 11/15/14, 6:58 PM
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 <C-g>
You can find more global aliases and tips at: http://grml.org/zsh/zsh-lovers.html
by jryan49 on 11/15/14, 5:19 PM
rationalise-dot() {
if [[ $LBUFFER = *.. ]]; then
LBUFFER+=/..
else
LBUFFER+=.
fi
}
zle -N rationalise-dot
bindkey . rationalise-dot
When you hit ... it will produce a slash and a ../ for each . you type after that.by andrewstuart2 on 11/15/14, 5:14 PM
ls something<TAB>
will complete to ls prefixSomething.sh
if it's unique enough. This is probably my single favorite zsh feature.by billiob on 11/15/14, 4:52 PM
by seniorsassycat on 11/15/14, 6:49 PM
https://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.
by rafaelnonato on 11/16/14, 12:21 AM
by gcb0 on 11/15/14, 5:51 PM
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 is available everywhere so you can use it in scripts.
by jradd on 11/15/14, 7:48 PM
by changs on 11/15/14, 7:15 PM
by arianvanp on 11/15/14, 9:48 PM
say I type
$ sudo pacman -Syu
$ sudo chown blah blah
$ sudo pa <UP>
I just get `sudo chown blah blah` instead of `sudo pacman -Syu`Does anybody know how to fix this? :)
by rnhmjoj on 11/15/14, 6:41 PM
I feel lost without it, more than the tab completion.
by krick on 11/16/14, 2:47 AM
by zobzu on 11/15/14, 7:11 PM