display shell level
This commit is contained in:
parent
512e3d264d
commit
0caabf18f5
@ -20,7 +20,7 @@ export PATH
|
||||
autoload -U colors
|
||||
colors
|
||||
PROMPT="%{$fg_bold[yellow]%}%* %{$fg_bold[cyan]%}%d %(?.$fg_bold[green]✓.$fg_bold[red]%?)
|
||||
%{$fg_bold[yellow]%}%% %{$reset_color%}"
|
||||
%(3L.$fg_bold[red]%L .)%{$fg_bold[yellow]%}%% %{$reset_color%}"
|
||||
|
||||
source $HOME/.config/zsh/key-bindings.zsh
|
||||
|
||||
@ -29,11 +29,15 @@ bindkey "^[[4~" end-of-line
|
||||
bindkey "^[[4h" overwrite-mode
|
||||
bindkey "^[[P" delete-char
|
||||
|
||||
# save path on cd (chpwd is a zsh hook)
|
||||
# save path on cd (chpwd is a zsh hook) and spawned subshell
|
||||
function chpwd {
|
||||
pwd > ~/.last_dir
|
||||
}
|
||||
|
||||
if [[ $SHLVL -ge 3 ]]; then
|
||||
chpwd
|
||||
fi
|
||||
|
||||
# restore last saved path on launch
|
||||
if [[ -f ~/.last_dir ]]; then
|
||||
cd $(cat ~/.last_dir)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user