summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-09-27 14:20:54 +0200
committerJulian T <julian@jtle.dk>2020-09-27 14:20:54 +0200
commit840fe96ea339c05fd5be22bbba4da2f7a6abb76b (patch)
tree98a3ad9a3e909a97de59a2704d730738152530ec
parent42dd75e25f01b680c958cc6d1838f3d21e36b269 (diff)
Nixer nixenv zsh function and gittr
-rw-r--r--zsh/.zshrc22
1 files 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
}
+