From 840fe96ea339c05fd5be22bbba4da2f7a6abb76b Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 27 Sep 2020 14:20:54 +0200 Subject: Nixer nixenv zsh function and gittr --- zsh/.zshrc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 7a7cf9f..1778f49 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -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 } + -- cgit v1.2.3