diff options
author | Griffin Smith <root@gws.fyi> | 2020-06-08T14·20-0400 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2020-06-08T14·20-0400 |
commit | 51e202ff47a2690b9942d11507572039fdbb7a58 (patch) | |
tree | 21bdd1862a9115bd98932a42dfac8f09f37e1e57 /home/modules/development.nix | |
parent | f2ddb560dd6d2aa195f99f48a0d8e9b5c978bd94 (diff) |
a gdelmerged function
Diffstat (limited to 'home/modules/development.nix')
-rw-r--r-- | home/modules/development.nix | 114 |
1 files changed, 61 insertions, 53 deletions
diff --git a/home/modules/development.nix b/home/modules/development.nix index 9bb24b256110..a8e74ed6dff3 100644 --- a/home/modules/development.nix +++ b/home/modules/development.nix @@ -90,58 +90,66 @@ with lib; ''; }; - programs.zsh.shellAliases = { - # Git - "gwip" = "git add . && git commit -am wip"; - "gpr" = "g pull-request"; - "gcl" = "git clone"; - "grs" = "gr --soft"; - "grhh" = "grh HEAD"; - "grh" = "gr --hard"; - "gr" = "git reset"; - "gcb" = "gc -b"; - "gco" = "gc"; - "gcd" = "gc development"; - "gcm" = "gc master"; - "gc" = "git checkout"; - "gbg" = "git branch | grep"; - "gba" = "git branch -a"; - "gb" = "git branch"; - "gcv" = "git commit --verbose"; - "gci" = "git commit"; - "gm" = "git merge"; - "gdc" = "gd --cached"; - "gd" = "git diff"; - "gsl" = "git stash list"; - "gss" = "git show stash"; - "gsad" = "git stash drop"; - "gsa" = "git stash"; - "gst" = "gs"; - "gs" = "git status"; - "gg" = "gl --decorate --oneline --graph --date-order --all"; - "gl" = "git log"; - "gf" = "git fetch"; - "gur" = "gu --rebase"; - "gu" = "git pull"; - "gpf" = "gp -f"; - "gpa" = "gp --all"; - "gpu" = "git push -u origin \"$(git symbolic-ref --short HEAD)\""; - "gp" = "git push"; - "ganw" = "git diff -w --no-color | git apply --cached --ignore-whitespace"; - "ga" = "git add"; - "gnp" = "git --no-pager"; - "g" = "git"; - "git" = "hub"; - "grim" = "git fetch && git rebase -i origin/master"; - "grc" = "git rebase --continue"; - "gcan" = "git commit --amend --no-edit"; - "grl" = "git reflog"; - - # Haskell - "cnb" = "cabal new-build"; - "cob" = "cabal old-build"; - "cnr" = "cabal new-run"; - "cor" = "cabal old-run"; - "ho" = "hoogle"; + programs.zsh = { + shellAliases = { + # Git + "gwip" = "git add . && git commit -am wip"; + "gpr" = "g pull-request"; + "gcl" = "git clone"; + "grs" = "gr --soft"; + "grhh" = "grh HEAD"; + "grh" = "gr --hard"; + "gr" = "git reset"; + "gcb" = "gc -b"; + "gco" = "gc"; + "gcd" = "gc development"; + "gcm" = "gc master"; + "gc" = "git checkout"; + "gbg" = "git branch | grep"; + "gba" = "git branch -a"; + "gb" = "git branch"; + "gcv" = "git commit --verbose"; + "gci" = "git commit"; + "gm" = "git merge"; + "gdc" = "gd --cached"; + "gd" = "git diff"; + "gsl" = "git stash list"; + "gss" = "git show stash"; + "gsad" = "git stash drop"; + "gsa" = "git stash"; + "gst" = "gs"; + "gs" = "git status"; + "gg" = "gl --decorate --oneline --graph --date-order --all"; + "gl" = "git log"; + "gf" = "git fetch"; + "gur" = "gu --rebase"; + "gu" = "git pull"; + "gpf" = "gp -f"; + "gpa" = "gp --all"; + "gpu" = "git push -u origin \"$(git symbolic-ref --short HEAD)\""; + "gp" = "git push"; + "ganw" = "git diff -w --no-color | git apply --cached --ignore-whitespace"; + "ga" = "git add"; + "gnp" = "git --no-pager"; + "g" = "git"; + "git" = "hub"; + "grim" = "git fetch && git rebase -i origin/master"; + "grc" = "git rebase --continue"; + "gcan" = "git commit --amend --no-edit"; + "grl" = "git reflog"; + + # Haskell + "cnb" = "cabal new-build"; + "cob" = "cabal old-build"; + "cnr" = "cabal new-run"; + "cor" = "cabal old-run"; + "ho" = "hoogle"; + }; + + functions = { + gdelmerged = '' + git branch --merged | egrep -v 'master' | tr -d '+ ' | xargs git branch -d + ''; + }; }; } |