Tag Archives: zsh

zshell: rsync hostname completion with zsh

If you use ssh a lot with zsh and have a lot of entries in your hostsfile (/etc/hosts) you might find it convenient to disable completion from these hosts by using: zstyle ‘:completion:*’ hosts off However, this may give you adverse affects, and your hostnames may stop auto-completing with rsync – in order to fix this try also adding this in to your .zshrc zstyle -s ‘:completion:*:hosts’ hosts _ssh_config [[ -r ~/.ssh/config ]] && _ssh_config+=($(cat ~/.ssh/config | sed -ne ‘s/Host[=\t ]//p’)) zstyle ‘:completion:*:hosts’ hosts $_ssh_config If you also use oh-my-zsh and are still having trouble, trying adding those lines after this line: source $ZSH/oh-my-zsh.sh

Posted in Tech Tips | Tagged , | 1 Comment

What does zsh-lovers do?

What is zsh-lovers? What does zsh-lovers do? You may have run something like brew search zsh and gotten a few results: zsh zsh-completions zsh-history-substring-search zsh-lovers zsh-syntax-highlighting zshdb Running brew info zsh-lovers isn’t that helpful: zsh-lovers: stable 0.9.0 http://grml.org/zsh/#zshlovers /usr/local/Cellar/zsh-lovers/0.9.0 (2 files, 60K) * Built from source From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/zsh-lovers.rb And neither is visiting the website that is referenced: http://grml.org/zsh/#zshlovers So, what is zsh-lovers? And what does zsh-lovers do? Simple! It’s just a man page with a lot of zsh examples that gets added alongside your other man pages, allowing you to run: man zsh-lovers And get this: ZSH-LOVERS(1) ZSH-LOVERS(1) NAME zsh-lovers – tips, tricks and examples for the Z shell SYNOPSIS Just read it. ;-) OVERVIEW Whenever we look at the zsh manual we wonder why there are no examples or those simply things in (shell) life. The zsh contains many features, but there was no manpage with some examples (like procmailex(5)). That’s why we wrote this manpage. Most of the tricks and one-liner come from the mailing lists zsh-users, zsh-workers, google, newsgroups and from ourself. See section LINKS for details. Note: This manpage (zsh-lovers(1)) is not an official part of the Z shell! It’s just a just for fun – manpage ;) For comments, bug reports and feedback take a quick look at the section BUGS.

Posted in Tech Tips | Tagged | Leave a comment