diff options
| author | Mehdi Sadeghi <mehdi@mehdix.org> | 2021-04-18 15:05:33 +0200 |
|---|---|---|
| committer | Mehdi Sadeghi <mehdi@mehdix.org> | 2021-04-18 15:14:01 +0200 |
| commit | a0d93ac5d9a6e0e9687f50b54e5f8b34b8f38f25 (patch) | |
| tree | 6f5414c93f8a13baee2001507600f43d7a37642b /.zshrc | |
| parent | 534744db72b63e9ab6a9ab3f35a6aa59d45d3b5b (diff) | |
Add zshenv and zprofile.
Diffstat (limited to '.zshrc')
| -rw-r--r-- | .zshrc | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -5,7 +5,7 @@ else export ZSH="/usr/share/oh-my-zsh" fi -# simple, frisk, mrtazz, lambda, maran, robbyrussel, random +# simple, arrow, edvardm, random ZSH_THEME=simple # Uncomment the following line to use case-sensitive completion. @@ -21,6 +21,7 @@ plugins=(git autojump history-substring-search)# timer gem rust cargo) # Activate oh-my-zsh source $ZSH/oh-my-zsh.sh +# Add direnv hook _direnv_hook() { eval "$("/usr/bin/direnv" export zsh)"; } @@ -33,11 +34,12 @@ fi #export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" #[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +# Enable kubectl completion if present if [[ -a `which kubectl` ]]; then source <(kubectl completion zsh 2> /dev/null); fi -# For X.org +# Add X.org keyboard mapping (of no use on Wayland) #setxkbmap \ # -layout de,ir \ # -variant nodeadkeys,pes_keypad \ @@ -47,3 +49,19 @@ fi # -option 'lv3:caps_switch' \ # -option 'terminate:ctrl_alt_bkspc' \ # -option 'eurosign:e' + +# Aliases +# `githome` alias is a trick to avoid having git prompt when working +# in different directories of my home folder. I simply rename `.git` +# folder to `.githome` and use the following alias to interact with it. +# On new systems I only need to do the following: +# cd ~ +# git init +# git remote add origin git@git.sr.ht:~mehdix/dotfiles +# or +# git remote add origin https://git.sr.ht/~mehdix/dotfiles +# git fetch +# git checkout -f master +# mv .git .githome +alias githome='git --git-dir ~/.githome --work-tree ~' + |
