0856b1d8b0c3

mor
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 04 Nov 2013 10:33:01 -0500
parents 6908dae7c07b
children d25535222d29
branches/tags (none)
files fish/config.fish gitconfig

Changes

--- a/fish/config.fish	Wed Oct 30 10:58:10 2013 -0400
+++ b/fish/config.fish	Mon Nov 04 10:33:01 2013 -0500
@@ -160,6 +160,18 @@
 end
 
 # }}}
+# Completions {{{
+
+function make_completion --argument alias command
+    complete -c $alias -xa "(
+        set -l cmd (commandline -pc | sed -e 's/^ *\S\+ *//' );
+        complete -C\"$command \$cmd\";
+    )"
+end
+
+make_completion g "git"
+
+# }}}
 # Bind Keys {{{
 
 # Backwards compatibility?  Screw that, it's more important that our function
--- a/gitconfig	Wed Oct 30 10:58:10 2013 -0400
+++ b/gitconfig	Mon Nov 04 10:33:01 2013 -0500
@@ -34,7 +34,7 @@
     ci = commit
     cm = commit -m
 
-    d = !git diff | vim -R -
+    d = "!sh -c 'git diff $* | vim -R -' -"
     di = !git diff --cached | vim -R -
 
     co = checkout
@@ -46,6 +46,12 @@
     unstage = reset HEAD
     uns = reset HEAD
 
+    shelve = stash save --include-untracked
+    unshelve = stash pop
+
+    shel = shelve
+    unshel = unshelve
+
     delete-local-branch = branch -D
     delete-remote-branch = push origin --delete
     delete-local-reference-to-remote-branch = branch -rd