This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
zsh [2020-08-14 20:28:44] mi created |
zsh [2022-05-20 00:58:20] (current) mi |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| * Prompt: | * Prompt: | ||
| - | PROMPT='%(?.%F{green}√.%F{red}?%?)%f %B%F{240}%~%f%b %# ' | + | PROMPT='%(?.%F{green}√.%F{red}?%?)%f %K{81}%B%~ %#%b%K{default} ' |
| - | + | ||
| * History: | * History: | ||
| + | (See also https://unix.stackexchange.com/a/111777/7286) | ||
| HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history | HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history | ||
| Line 27: | Line 28: | ||
| # removes blank lines from history | # removes blank lines from history | ||
| setopt HIST_REDUCE_BLANKS | setopt HIST_REDUCE_BLANKS | ||
| + | |||
| + | alias history='fc -l -i 1' | ||
| * case-insensitive globbing, and don't tab-complete all directly : | * case-insensitive globbing, and don't tab-complete all directly : | ||
| Line 32: | Line 35: | ||
| setopt NO_CASE_GLOB | setopt NO_CASE_GLOB | ||
| setopt GLOB_COMPLETE | setopt GLOB_COMPLETE | ||
| + | |||
| + | * Allow comments in interactive shells | ||
| + | |||
| + | setopt interactive_comments | ||
| + | # or | ||
| + | set -k | ||
| + | # or | ||
| + | echo "setopt INTERACTIVE_COMMENTS" >> ~/.zshrc | ||
| + | # or | ||
| + | echo "setopt INTERACTIVE_COMMENTS" | sudo tee -a /etc/zshrc | ||
| + | |||
| + | * fix Ctrl-U to delete left | ||
| + | |||
| + | echo 'bindkey \^U backward-kill-line' >> ~/.zshrc | ||
| + | |||
| + | |||
| + | Also try this? (https://superuser.com/questions/187639/zsh-not-hitting-profile) : | ||
| + | |||
| + | [[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile' | ||