From 7bba9e8410d4b5dec7f6e2ab5c5bd9fa8ef074f6 Mon Sep 17 00:00:00 2001 From: Phantop Date: Sun, 7 Apr 2019 20:54:11 -0400 Subject: [PATCH] Fish: change git functions to abbreviations --- .config/fish/config.fish | 20 ++++++++++++++++--- .config/fish/fish_variables | 13 ++++++++++++ .../functions/fish_user_key_bindings.fish | 4 ++-- .config/fish/functions/fruitdl.fish | 12 +++++------ .config/fish/functions/fuckgit.fish | 4 ++-- .config/fish/functions/g.fish | 4 ---- .config/fish/functions/ga.fish | 4 ---- .config/fish/functions/gad.fish | 4 ---- .config/fish/functions/gb.fish | 4 ---- .config/fish/functions/gc.fish | 4 ---- .config/fish/functions/gca.fish | 4 ---- .config/fish/functions/gch.fish | 4 ---- .config/fish/functions/gg.fish | 4 ---- .config/fish/functions/gl.fish | 4 ---- .config/fish/functions/gp.fish | 4 ---- .config/fish/functions/gpu.fish | 4 ---- .config/fish/functions/gs.fish | 4 ---- .config/fish/functions/gsu.fish | 4 ++-- .config/fish/functions/gu.fish | 4 ---- .config/fish/functions/gupall.fish | 2 +- .config/fish/functions/motherfuckgit.fish | 10 +++++----- 21 files changed, 48 insertions(+), 73 deletions(-) delete mode 100755 .config/fish/functions/g.fish delete mode 100644 .config/fish/functions/ga.fish delete mode 100644 .config/fish/functions/gad.fish delete mode 100644 .config/fish/functions/gb.fish delete mode 100644 .config/fish/functions/gc.fish delete mode 100644 .config/fish/functions/gca.fish delete mode 100644 .config/fish/functions/gch.fish delete mode 100644 .config/fish/functions/gg.fish delete mode 100644 .config/fish/functions/gl.fish delete mode 100644 .config/fish/functions/gp.fish delete mode 100644 .config/fish/functions/gpu.fish delete mode 100644 .config/fish/functions/gs.fish delete mode 100644 .config/fish/functions/gu.fish diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 37d54a8..15097f4 100755 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -5,9 +5,8 @@ end set -gx ANDROID_HOME $D/Installs/Android/sdk set -gx fish_user_paths $D/Tools ~/.local/bin /usr/bin /usr/local/bin /bin /usr/sbin /usr/local/sbin /sbin $PLAN9/bin $ANDROID_HOME/platform-tools -set -gx ENV .profile -set -gx FFF_CD_FILE ~/.fff_d +# FISHER # set -g fisher_path ~/.config/fish/fisher set fish_function_path $fish_function_path[1] $fisher_path/functions $fish_function_path[2..-1] set fish_complete_path $fish_complete_path[1] $fisher_path/completions $fish_complete_path[2..-1] @@ -25,5 +24,20 @@ xrdb ~/.Xresources # MULTIMC INSTANCES # for i in (ls $D/Games/Minecraft/Game/instances) - alias $i="minecraft -l $i" + alias $i "minecraft -l $i" end + +# GIT ABBREVIATIONS # +abbr -a g 'git' +abbr -a gg 'git clone' +abbr -a ga 'git commit -a' +abbr -a gc 'git commit' +abbr -a gs 'git status' +abbr -a gpu 'git push' +abbr -a gp 'git pull' +abbr -a gch 'git checkout' +abbr -a gad 'git add' +abbr -a gb 'git branch' +abbr -a gl 'git log' +abbr -a gca 'git commit --amend' +abbr -a gpuf 'git push -f' diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index be23617..39ecfdf 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -9,6 +9,19 @@ SETUVAR Z_EXCLUDE:/home/glados SETUVAR __fish_init_2_39_8:\x1d SETUVAR __fish_init_2_3_0:\x1d SETUVAR __fish_init_3_x:\x1d +SETUVAR _fish_abbr_g:git +SETUVAR _fish_abbr_ga:git\x20commit\x20\x2da +SETUVAR _fish_abbr_gad:git\x20add +SETUVAR _fish_abbr_gb:git\x20branch +SETUVAR _fish_abbr_gc:git\x20commit +SETUVAR _fish_abbr_gca:git\x20commit\x20\x2d\x2damend +SETUVAR _fish_abbr_gch:git\x20checkout +SETUVAR _fish_abbr_gg:git\x20clone +SETUVAR _fish_abbr_gl:git\x20log +SETUVAR _fish_abbr_gp:git\x20pull +SETUVAR _fish_abbr_gpu:git\x20push +SETUVAR _fish_abbr_gpuf:git\x20push\x20\x2df +SETUVAR _fish_abbr_gs:git\x20status SETUVAR fish_color_autosuggestion:555\x1ebrblack SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_command:\x2d\x2dbold diff --git a/.config/fish/functions/fish_user_key_bindings.fish b/.config/fish/functions/fish_user_key_bindings.fish index cd72f9c..6338a20 100755 --- a/.config/fish/functions/fish_user_key_bindings.fish +++ b/.config/fish/functions/fish_user_key_bindings.fish @@ -1,7 +1,7 @@ -# Defined in /tmp/fish.9KWK2Q/fish_user_key_bindings.fish @ line 2 +# Defined in /tmp/fish.PIg13m/fish_user_key_bindings.fish @ line 2 function fish_user_key_bindings bind \co 'fff' bind \eo 'cd (ffd | fzf)' bind \ed 'ncdu' - bind \eg 'gl; gs' + bind \eg 'git log; git status' end diff --git a/.config/fish/functions/fruitdl.fish b/.config/fish/functions/fruitdl.fish index a34b4ce..160cba2 100755 --- a/.config/fish/functions/fruitdl.fish +++ b/.config/fish/functions/fruitdl.fish @@ -1,10 +1,10 @@ # Defined in /tmp/fish.VXbo9N/fruitdl.fish @ line 2 function fruitdl - cd $D/Games/Emulators/$argv[2] - rm -r $argv[1] - set file (curl -sL github.com/$argv[2]-emu/$argv[2]-$argv[1]/releases/latest| grep -o -m1 $argv[2]-emu/$argv[2]-$argv[1]/releases/download/$argv[1]-[0-9]\*/$argv[2]-linux-[0-9]\*-[0-9a-f]\*) - dl http://github.com/$file.7z + cd $D/Games/Emulators/$argv[2] + rm -r $argv[1] + set file (curl -sL github.com/$argv[2]-emu/$argv[2]-$argv[1]/releases/latest| grep -om1 $argv[2]-emu/$argv[2]-$argv[1]/releases/download/$argv[1]-[0-9]\*/$argv[2]-linux-[0-9]\*-[0-9a-f]\*).7z + dl http://github.com/$file set file (basename $file) - 7z x $file.7z - rm $file.7z + 7z x $file + rm $file end diff --git a/.config/fish/functions/fuckgit.fish b/.config/fish/functions/fuckgit.fish index 298878b..f5bfac3 100755 --- a/.config/fish/functions/fuckgit.fish +++ b/.config/fish/functions/fuckgit.fish @@ -1,5 +1,5 @@ # Defined in /tmp/fish.5KyO71/fuckgit.fish @ line 2 function fuckgit - g reset --hard - g clean -fdx + git reset --hard + git clean -fdx end diff --git a/.config/fish/functions/g.fish b/.config/fish/functions/g.fish deleted file mode 100755 index 93f25f5..0000000 --- a/.config/fish/functions/g.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.NlxV5h/g.fish @ line 1 -function g - git $argv -end diff --git a/.config/fish/functions/ga.fish b/.config/fish/functions/ga.fish deleted file mode 100644 index 7c64d96..0000000 --- a/.config/fish/functions/ga.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.82JlO9/ga.fish @ line 1 -function ga - g commit -a $argv -end diff --git a/.config/fish/functions/gad.fish b/.config/fish/functions/gad.fish deleted file mode 100644 index 2ad8345..0000000 --- a/.config/fish/functions/gad.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.BiFvWk/gad.fish @ line 1 -function gad - g add $argv -end diff --git a/.config/fish/functions/gb.fish b/.config/fish/functions/gb.fish deleted file mode 100644 index ec9cfb8..0000000 --- a/.config/fish/functions/gb.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.Hll5zs/gb.fish @ line 1 -function gb - g branch $argv -end diff --git a/.config/fish/functions/gc.fish b/.config/fish/functions/gc.fish deleted file mode 100644 index c8cfb69..0000000 --- a/.config/fish/functions/gc.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.Q4WxYZ/gc.fish @ line 2 -function gc - g commit $argv -end diff --git a/.config/fish/functions/gca.fish b/.config/fish/functions/gca.fish deleted file mode 100644 index fa9e71a..0000000 --- a/.config/fish/functions/gca.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.zZphWc/gca.fish @ line 1 -function gca - gc --amend $argv -end diff --git a/.config/fish/functions/gch.fish b/.config/fish/functions/gch.fish deleted file mode 100644 index bbbd3e5..0000000 --- a/.config/fish/functions/gch.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.JRvWi7/gch.fish @ line 1 -function gch - g checkout $argv -end diff --git a/.config/fish/functions/gg.fish b/.config/fish/functions/gg.fish deleted file mode 100644 index 027188b..0000000 --- a/.config/fish/functions/gg.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.6oIQ1v/gg.fish @ line 1 -function gg - g clone $argv -end diff --git a/.config/fish/functions/gl.fish b/.config/fish/functions/gl.fish deleted file mode 100644 index 6e1776c..0000000 --- a/.config/fish/functions/gl.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.qBXhXo/gl.fish @ line 1 -function gl - g log $argv -end diff --git a/.config/fish/functions/gp.fish b/.config/fish/functions/gp.fish deleted file mode 100644 index 042bebf..0000000 --- a/.config/fish/functions/gp.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.nf13Gy/gp.fish @ line 2 -function gp - g pull $argv -end diff --git a/.config/fish/functions/gpu.fish b/.config/fish/functions/gpu.fish deleted file mode 100644 index 05461c7..0000000 --- a/.config/fish/functions/gpu.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.kr2YnC/gpu.fish @ line 2 -function gpu - g push $argv -end diff --git a/.config/fish/functions/gs.fish b/.config/fish/functions/gs.fish deleted file mode 100644 index 3aef931..0000000 --- a/.config/fish/functions/gs.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.CVwQ4j/gs.fish @ line 1 -function gs - g status $argv -end diff --git a/.config/fish/functions/gsu.fish b/.config/fish/functions/gsu.fish index 3b25185..d271327 100644 --- a/.config/fish/functions/gsu.fish +++ b/.config/fish/functions/gsu.fish @@ -1,5 +1,5 @@ # Defined in /tmp/fish.tGpsnp/gsu.fish @ line 2 function gsu - g submodule update --init --recursive - g submodule foreach git pull origin master + git submodule update --init --recursive + git submodule foreach git pull origin master end diff --git a/.config/fish/functions/gu.fish b/.config/fish/functions/gu.fish deleted file mode 100644 index 554322e..0000000 --- a/.config/fish/functions/gu.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in /tmp/fish.iJlPcC/gu.fish @ line 2 -function gu - g push $argv -end diff --git a/.config/fish/functions/gupall.fish b/.config/fish/functions/gupall.fish index 69d907a..6c04e6b 100644 --- a/.config/fish/functions/gupall.fish +++ b/.config/fish/functions/gupall.fish @@ -2,7 +2,7 @@ function gupall for i in * cd $i - g pull + git pull cd .. end end diff --git a/.config/fish/functions/motherfuckgit.fish b/.config/fish/functions/motherfuckgit.fish index 3f26443..f68e009 100644 --- a/.config/fish/functions/motherfuckgit.fish +++ b/.config/fish/functions/motherfuckgit.fish @@ -1,8 +1,8 @@ # Defined in /tmp/fish.XTFPQZ/motherfuckgit.fish @ line 1 function motherfuckgit - g clean -xfd - g submodule foreach --recursive git clean -xfd - g reset --hard - g submodule foreach --recursive git reset --hard - g submodule update --init --recursive + git clean -xfd + git submodule foreach --recursive git clean -xfd + git reset --hard + git submodule foreach --recursive git reset --hard + git submodule update --init --recursive end