mirror of
https://github.com/Phantop/dotfiles
synced 2024-09-29 13:32:06 +00:00
Fish: change git functions to abbreviations
This commit is contained in:
parent
9cf8ddb0c1
commit
7bba9e8410
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
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
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.NlxV5h/g.fish @ line 1
|
||||
function g
|
||||
git $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.82JlO9/ga.fish @ line 1
|
||||
function ga
|
||||
g commit -a $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.BiFvWk/gad.fish @ line 1
|
||||
function gad
|
||||
g add $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.Hll5zs/gb.fish @ line 1
|
||||
function gb
|
||||
g branch $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.Q4WxYZ/gc.fish @ line 2
|
||||
function gc
|
||||
g commit $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.zZphWc/gca.fish @ line 1
|
||||
function gca
|
||||
gc --amend $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.JRvWi7/gch.fish @ line 1
|
||||
function gch
|
||||
g checkout $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.6oIQ1v/gg.fish @ line 1
|
||||
function gg
|
||||
g clone $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.qBXhXo/gl.fish @ line 1
|
||||
function gl
|
||||
g log $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.nf13Gy/gp.fish @ line 2
|
||||
function gp
|
||||
g pull $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.kr2YnC/gpu.fish @ line 2
|
||||
function gpu
|
||||
g push $argv
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.CVwQ4j/gs.fish @ line 1
|
||||
function gs
|
||||
g status $argv
|
||||
end
|
|
@ -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
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
# Defined in /tmp/fish.iJlPcC/gu.fish @ line 2
|
||||
function gu
|
||||
g push $argv
|
||||
end
|
|
@ -2,7 +2,7 @@
|
|||
function gupall
|
||||
for i in *
|
||||
cd $i
|
||||
g pull
|
||||
git pull
|
||||
cd ..
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue