zsh: implement multi-dot directory change without cd
This commit is contained in:
@@ -1 +1,10 @@
|
||||
alias ll="ls -alG"
|
||||
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias .....="cd ../../../.."
|
||||
alias ......="cd ../../../../.."
|
||||
alias .......="cd ../../../../../.."
|
||||
alias ........="cd ../../../../../../.."
|
||||
alias .........="cd ../../../../../../../.."
|
||||
alias ..........="cd ../../../../../../../../.."
|
||||
|
||||
0
zsh/commands.zsh
Normal file
0
zsh/commands.zsh
Normal file
2
zsh/config.zsh
Normal file
2
zsh/config.zsh
Normal file
@@ -0,0 +1,2 @@
|
||||
setopt prompt_subst
|
||||
setopt auto_cd
|
||||
12
zsh/init.zsh
12
zsh/init.zsh
@@ -20,6 +20,12 @@ source $zsh_dir/plugin.zsh
|
||||
source $zsh_dir/environment.zsh
|
||||
|
||||
|
||||
################################################################################
|
||||
# CONFIG initialisation
|
||||
|
||||
source $zsh_dir/config.zsh
|
||||
|
||||
|
||||
################################################################################
|
||||
# ALIAS initialisation
|
||||
|
||||
@@ -30,3 +36,9 @@ source $zsh_dir/alias.zsh
|
||||
# PROMPT initialisation
|
||||
|
||||
source $zsh_dir/prompt.zsh
|
||||
|
||||
|
||||
################################################################################
|
||||
# COMMAND initialisation
|
||||
|
||||
source $zsh_dir/commands.zsh
|
||||
|
||||
@@ -2,5 +2,4 @@ parse_git_branch() {
|
||||
git symbolic-ref --short HEAD 2> /dev/null | sed -E 's/(.+)/ [\1]/g'
|
||||
}
|
||||
|
||||
setopt prompt_subst
|
||||
PROMPT='%F{yellow}%m%F{none}:%F{blue}%2d%F{none}%F{red}$(parse_git_branch) %F{%(?.green.red)}%#%F{none} '
|
||||
|
||||
Reference in New Issue
Block a user