User Tools

Site Tools


zsh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
zsh [2020-08-16 13:52:50]
mi
zsh [2026-07-14 16:32:43] (current)
mi
Line 5: Line 5:
 * Prompt: * Prompt:
  
-  PROMPT='​%(?​.%F{green}√.%F{red}?​%?​)%K{81} %B%~ %#%b ' +  PROMPT='​%(?​.%F{green}√.%F{red}?​%?​)%f %K{81}%B%~ %#%b%K{default} ​
-  +
 * History: * History:
 +(See also https://​unix.stackexchange.com/​a/​111777/​7286)
 +
 +(Should add "​export"​ before definitions?​)
  
   HISTFILE=${ZDOTDIR:​-$HOME}/​.zsh_history   HISTFILE=${ZDOTDIR:​-$HOME}/​.zsh_history
Line 27: Line 30:
   # removes blank lines from history   # removes blank lines from history
   setopt HIST_REDUCE_BLANKS   setopt HIST_REDUCE_BLANKS
 +
 +  alias history='​fc -l -i 1'
 +  # or
 +  alias history='​history -i 0'
  
 * case-insensitive globbing, and don't tab-complete all directly : * case-insensitive globbing, and don't tab-complete all directly :
Line 32: Line 39:
   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'​
 +
/docs/dokuwiki/data/attic/zsh.1597578770.txt.gz · Last modified: 2020-08-16 13:52:50 by mi