alias -s git="git clone"Zsh Tricks to Blow Your Mind
131–140 of 218 posts
Re: Zsh Tricks to Blow Your Mind
#132I like the ^R trick. In bash I usually just !(whatever the string is) which only matches the last one or the more infamous !?(whatever the file/obj you were applying the command to)?
Re: Zsh Tricks to Blow Your Mind
#133Re: Zsh Tricks to Blow Your Mind
#134Earlier quoted context omitted.
I'd also dare to bet the author's favourite pizza is Hawaiian/pineapple
Salty/sweet contrast is the core of Hawaiian pizza appeal, and flavour/texture contrasts are the foundation of some of the most interesting foods, for instance salted caramel, pork and apples, etc.
Re: Zsh Tricks to Blow Your Mind
#135 $ cd /u/b/l
That will expand into /usr/bin/local. If there are ambiguities at any point, it will expand as much as it can and let you fix it at the point where a decision needs to be made (pressing tab again will show you the options, like Bash et al). For example: $ /u/b/gr
$ /usr/bin/gr
grep groff groupsRe: Zsh Tricks to Blow Your Mind
#136Earlier quoted context omitted.
the kerning in the screenshots is "hilarious"
looks like a version of Comic Sans, possibly http://www.comicneue.com/ or as recently discussed Comic Mono: https://news.ycombinator.com/item?id=25520510 https://dtinth.github.io/comic-mono-font/
Re: Zsh Tricks to Blow Your Mind
#137What is the zsh functionality behind this? I couldn't test it because my terminal eats Ctrl-q and a search for "zsh ctrl-q" didn't turn up anything useful.
Re: Zsh Tricks to Blow Your Mind
#138One thing that many people miss are parameter expansions. Those are in Posix, so pretty much any bare shell should be able to use that, too. So dash/bash/zsh/ksh…
echo Hello ${PLANET:-World}
to have a default if you're not sure a variable is set. Replace "-" with "=" to actually set it, not just use it for this statement.Or removing suffixes:
filename=/tmp/foobar.tar.gz
echo ${filename%.*} # -> /tmp/foobar.tar
echo ${filename%%.*} # -> /tmp/foobar
Saves you some useless sed/awk.I still wish the Linux shells (bash/zsh) would start to finally get some more features from friggin' ksh93.
Re: Zsh Tricks to Blow Your Mind
#139Pure theme - My absolute favorite shell theme. Has almost all the bells and whistles of the powerlevel9k shown in the article, but looks, much cleaner and less in-your-face.
After downloading the theme, I've added this to my `.zshrc` file:
# PURE theme - see https://github.com/sindresorhus/pure
fpath+=$HOME/.zsh/pure
autoload -U promptinit; promptinit
prompt pure
Fuzzy find makes searching history much more powerful than what is listed in the article. I only use it together with ctr-r, but you can set it up for even more goodness. # Fuzzy find - see https://github.com/junegunn/fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
Lastly I've added a syntax highlighter, which is really neat. # ZSH Syntax Highlighter - see https://github.com/zsh-users/zsh-syntax-highlighting
source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
I don't use oh-my-zsh, but I think my terminal is as fully fledged as even the best oh-my-zsh can offer.Re: Zsh Tricks to Blow Your Mind
#140Earlier quoted context omitted.
I'd also dare to bet the author's favourite pizza is Hawaiian/pineapple
Salty/sweet contrast is the core of Hawaiian pizza appeal, and flavour/texture contrasts are the foundation of some of the most interesting foods, for instance salted caramel, pork and apples, etc.
Whenever the local Italian restaurant opens back up I'll go and try a properly made Hawaiian pizza :)