diff options
author | Julian T <julian@jtle.dk> | 2020-09-27 14:20:54 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-09-27 14:20:54 +0200 |
commit | 840fe96ea339c05fd5be22bbba4da2f7a6abb76b (patch) | |
tree | 98a3ad9a3e909a97de59a2704d730738152530ec | |
parent | 42dd75e25f01b680c958cc6d1838f3d21e36b269 (diff) |
Nixer nixenv zsh function and gittr
-rw-r--r-- | zsh/.zshrc | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -82,7 +82,7 @@ export EDITOR=nvim export SUDO_EDITOR=$EDITOR export LANG=en_US.UTF-8 export TERM="xterm-256color" -export LSCOLORS="Gxfxcxdxbxegedabagacad" + # # Alias @@ -93,8 +93,24 @@ alias ls='ls --color=auto' # # Functions # - function nixenv { export INNIXENV="true" - nix-shell $HOME/.shells/$1 --run zsh + SHELL="" + if [ "$#" -gt 0 ]; then + SHELL=$HOME/.nix-shells/$1 + fi + RUN=zsh + if [ "$#" -gt 1 ]; then + RUN=$2 + fi + nix-shell $SHELL --run $RUN +} +function gittr { + if [ $# -eq 0 ] + then + git push -u origin HEAD + return + fi + git push -u $1 HEAD } + |