tidy up some git stuff

hashbang
Ben Harris 2019-03-18 00:19:48 -04:00
parent 0e13329e0a
commit 61008d9492
No known key found for this signature in database
GPG Key ID: 4E0AF802FFF7960C
6 changed files with 8 additions and 5 deletions

View File

@ -1 +0,0 @@
fisher --complete

View File

@ -2,6 +2,7 @@
# VERSION: 3.0
SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d
SETUVAR __fish_init_3_x:\x1d
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:\x2d\x2dbold

View File

@ -1,3 +1,5 @@
complete -c g -w git
function g
if count $argv > /dev/null
git $argv

View File

@ -1,4 +1,5 @@
function is_git
git rev-parse --verify HEAD >/dev/null ^&1
# keeping ^ for now for v2 backwards compatibility
end

View File

@ -3,8 +3,7 @@ function is_git_dirty
is_git; or return 1
if git diff-files --quiet --ignore-submodules
and git diff-index --cached --quiet --ignore-submodules HEAD --
if git diff-files --quiet --ignore-submodules; and git diff-index --cached --quiet --ignore-submodules HEAD --
return 1
else
# we're dirty

View File

@ -1,4 +1,5 @@
# Defined in /home/ben/.config/fish/functions/l.fish @ line 1
complete -c l -w ls
function l
ls -lah --group-directories-first $argv
end