

Note: This special kind of context-aware completion is only available for a small number of commands.

~/.zshrc zstyle ':completion::complete:*' gain-privileges 1 if you complete a command starting with sudo, completion scripts will also try to determine your completions with sudo), include: ~/.zshrc zstyle ':completion:*' menu selectįor enabling autocompletion of privileged environments in privileged commands (e.g. option HashKnownHosts in ssh client configuration).įor autocompletion with an arrow-key driven interface, add the following to: The above configuration includes ssh/scp/sftp hostnames completion but in order for this feature to work, users must not enable ssh's hostname hashing (i.e. To enable autocompletion, add the following to your ~/.zshrc: At the very least, enable autocompletion in. Perhaps the most compelling feature of Zsh is its advanced autocompletion abilities. See A User's Guide to the Z-Shell for details. This allows you to manipulate PATH by simply modifying the path array. Zsh ties the PATH variable to a path array. See #Prompt themes for more details about the prompt theme system. # This will set the default prompt to the walters theme ~/.zshrc autoload -Uz compinit promptinit Tip: Apply the changes without needing to logout and then back in by running source ~/.zshrc. /etc/zsh/zlogout Used for executing commands for all users when a login shell exits.$ZDOTDIR/.zlogout Used for executing commands when a login shell exits.Should not be used to autostart graphical sessions, as at this point the session might contain configuration meant only for an interactive shell. Typically used to autostart command line utilities. $ZDOTDIR/.zlogin Used for executing user's commands at ending of initial progress, will be read when starting as a login shell./etc/zsh/zlogin Used for executing commands for all users at ending of initial progress, will be read when starting as a login shell.$ZDOTDIR/.zshrc Used for setting user's interactive shell configuration and executing commands, will be read when starting as an interactive shell./etc/zsh/zshrc Used for setting interactive shell configuration and executing commands for all users, will be read when starting as an interactive shell.Typically used to autostart graphical sessions and to set session-wide environment variables. $ZDOTDIR/.zprofile Used for executing user's commands at start, will be read when starting as a login shell./etc/profile This file should be sourced by all POSIX sh-compatible shells upon login: it sets up $PATH and other environment variables and application-specific ( /etc/profile.d/*.sh) settings upon login.See warning below before wanting to remove that! Please note that on Arch Linux, by default it contains one line which sources /etc/profile. /etc/zsh/zprofile Used for executing commands at start for all users, will be read when starting as a login shell.When this file exists it will always be read. $ZDOTDIR/.zshenv Used for setting user's environment variables it should not contain commands that produce output or assume the shell is attached to a TTY.When this file exists it will always be read, this cannot be overridden. /etc/zsh/zshenv Used for setting environment variables for all users it should not contain commands that produce output or assume the shell is attached to a TTY.When starting, Zsh will read commands from the following files in this order by default, provided they exist.


If option RCS is unset in any of the files, no configuration files will be read after that file.If $ZDOTDIR is not set, $HOME is used instead.
