diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2022-11-03 17:13:10 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2022-11-03 17:13:10 +0100 |
| commit | d5af56a7613eb1398f2f358aad3eca74ee024a5e (patch) | |
| tree | cb715c0228bd5f408b52ee469d62ac201b824479 /config | |
| parent | e3be35aec34c2bc5c07ee1f548c942c603819da3 (diff) | |
| download | dotfiles-d5af56a7613eb1398f2f358aad3eca74ee024a5e.tar.gz dotfiles-d5af56a7613eb1398f2f358aad3eca74ee024a5e.tar.bz2 dotfiles-d5af56a7613eb1398f2f358aad3eca74ee024a5e.zip | |
Fixing fish nvim alias and cleaning gpa(f) function
Diffstat (limited to 'config')
| -rw-r--r-- | config/fish/config.fish | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/config/fish/config.fish b/config/fish/config.fish index da796cf..7ba57d7 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -86,7 +86,7 @@ if status is-interactive alias grep 'grep --color=auto' alias tree 'tree -C' alias less 'less -N' # enable line number - alias nvim 'VIMINIT="" nvim' + alias nvim 'VIMINIT="" /usr/bin/nvim' alias v 'nvim' alias gdb 'gdb -q' # disable long intro message alias sudo 'sudo ' # enable color (the search for aliases continues) @@ -138,14 +138,10 @@ if status is-interactive abbr gra 'git remote add' abbr gb 'git branch' function gpa - set -f branch "$argv[1]" + set -f branch "$argv[-1]" + # if branch not specified, get current branch [ -z "$branch" ] && set -f branch "$(git branch | grep '^\* .*$' | cut -d ' ' -f 2)" - git remote | xargs -I{} git push {} "$branch" - end - function gpaf - set -f branch "$argv[1]" - [ -z "$branch" ] && set -f branch "$(git branch | grep '^\* .*$' | cut -d ' ' -f 2)" - git remote | xargs -I{} git push -f {} "$branch" + git remote | xargs -I{} git push {} $argv[..-2] "$branch" end # youtube-dl |
