Contents
Is there a bash completions function in zsh?
Zsh can handle bash completions functions. The latest development version of zsh has a function bashcompinit, that when run will allow zsh to read bash completion specifications and functions. This is documented in the zshcompsys man page. To use it all you need to do is run bashcompinit at any time after compinit.
How to auto complete SSH my awe in Bash?
Then, you can just type ssh my-awe and it will be automagically completed. Again, this is even if you HashKnownHosts, which is highly recommended. (Note that bash completion needs to be enabled in your bash shell, and you need to specifically have those scripts installed as above for your distribution.)
Is there a bug in SSH completion in Ubuntu?
It seems that in Ubuntu the entries in ~/.ssh/known_hosts are hashed, so SSH completion cannot read them. This is a feature, not a bug. Even by adding HashKnownHosts no to ~/.ssh/config and /etc/ssh/ssh_config I was unable to prevent the host hashing.
Do you need to enable completion in Bash?
(Note that bash completion needs to be enabled in your bash shell, and you need to specifically have those scripts installed as above for your distribution.) Then, add these lines to your .bashrc to enable it (requires a logout and log back in, or just a new bash typed in to launch a new shell.
How to make tab completion case insensitive in zsh?
Since the macOS file systems are usually case-insensitive, I prefer my tab-completion to be case-insensitive as well. For bash you configure that in the ~/.inputrc. In zsh you modify the completion systems behavior with this (monstrous) command: # case insensitive path-completion\
What does the tab key do in zsh?
In zsh you can also hit the tab key repeatedly to cycle through the suggested completions. In this example, the first tab keystroke will show the list, the second will complete ~/Desktop/, the third completes ~/Documents, and so on.
Which is the latest version of Zsh for Mac?
There are even a few macOS specific command that come with the default zsh installation. macOS High Sierra and macOS Mojave come with zsh 5.3, which is now nearly two years old. zsh 5.3 contains less macOS specific completion definitions than the current zsh 5.7.1 which will is the pre-installed zsh in macOS Catalina.