diff --git a/meta/components.json b/meta/components.json index d9aaad5..bfcb11d 100644 --- a/meta/components.json +++ b/meta/components.json @@ -4,5 +4,11 @@ "link-files": [ { "source": "init.zsh", "dest": ".zshrc" } ] + }, + { + "name": "nvim", + "link-dirs": [ + { "source": ".", "dest": ".config/nvim" } + ] } ] diff --git a/zsh/alias.zsh b/zsh/alias.zsh index 444c591..6ce0374 100644 --- a/zsh/alias.zsh +++ b/zsh/alias.zsh @@ -1 +1,10 @@ alias ll="ls -alG" + +alias ...="cd ../.." +alias ....="cd ../../.." +alias .....="cd ../../../.." +alias ......="cd ../../../../.." +alias .......="cd ../../../../../.." +alias ........="cd ../../../../../../.." +alias .........="cd ../../../../../../../.." +alias ..........="cd ../../../../../../../../.." diff --git a/zsh/commands.zsh b/zsh/commands.zsh new file mode 100644 index 0000000..e69de29 diff --git a/zsh/config.zsh b/zsh/config.zsh new file mode 100644 index 0000000..bc9cca9 --- /dev/null +++ b/zsh/config.zsh @@ -0,0 +1,2 @@ +setopt prompt_subst +setopt auto_cd diff --git a/zsh/init.zsh b/zsh/init.zsh index 48ba8d3..9018835 100644 --- a/zsh/init.zsh +++ b/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 diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh index 55f7ead..5272fb5 100644 --- a/zsh/prompt.zsh +++ b/zsh/prompt.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} '