Add configuration for zsh
- Add ~/.zshrc + Configure on how the `history` works + Enable nicer `cd` and globbing behavior + Enable tab completion, and make them feel nicer + Enable VI mode and add some VI-like key bindings - Add ~/.zlogout clearing the screen - Add ~/.config/zsh/.zshrc and make it dispatch to ~/.zshrc to make `zsh` use the same configuration even on more recent Debian/Ubuntu machines that do not look for ~/.zshrc any more - Ensure ~/.local/state/zsh/ exists
This commit is contained in:
parent
7d2ed96021
commit
3abcdabf31
11 changed files with 209 additions and 0 deletions
|
|
@ -12,9 +12,19 @@ forget() { # the current history and restore $HISTFILE from disk
|
|||
if [ -n "$BASH_VERSION" ]; then
|
||||
history -c
|
||||
history -r
|
||||
elif [ -n "$ZSH_VERSION" ]; then
|
||||
_histsize=$HISTSIZE
|
||||
HISTSIZE=0 # because shrinking the list to 0 discards all entries
|
||||
HISTSIZE=$_histsize
|
||||
unset _histsize
|
||||
fc -R "$HISTFILE"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -n "$ZSH_VERSION" ]; then
|
||||
alias forget=' forget' # Leading space => The invocation itself is forgotten because of `setopt HIST_IGNORE_SPACE`
|
||||
fi
|
||||
|
||||
|
||||
|
||||
alias path='echo $PATH | tr ":" "\n"'
|
||||
|
|
|
|||
Loading…
Reference in a new issue