Commits

Steve Losh committed 0856b1d

mor

Comments (0)

Files changed (2)

 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
     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
     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