old-dotfiles/.config/fish/config.fish

61 lines
2.0 KiB
Fish

if status is-interactive
# Commands to run in interactive sessions can go here
end
set -gx XDG_CONFIG_HOME /home/joe/.config
set -gx XDG_DATA_HOME /home/joe/.local/share
set -gx XDG_CACHE_HOME /home/joe/.cache
set -gx VISUAL nvim
set -gx EDITOR nvim
fish_hybrid_key_bindings
set -gx MANPAGER "sh -c 'col -bx | bat -l man -p'"
bind \cx 'if jobs > /dev/null ; fg; fish_prompt; end'
if [ (uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') ]
set -g DISPLAY (cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')
alias xdg-open wsl-open
end
abbr -a -g gs "git status --untracked-files"
abbr -a -g gl "git lop -10"
abbr -a -g gll "git lol -15"
abbr -a -g gchm "git checkout master"
abbr -a -g gchb "git checkout -b"
abbr -a -g gch "git checkout"
abbr -a -g gc "git commit"
abbr -a -g gcm "git commit -m"
abbr -a -g gcau "git commit --author"
abbr -a -g gcam "git commit -am"
abbr -a -g gcamm "git commit --amend"
abbr -a -g gaa "git add -A"
abbr -a -g gpl "git pull"
abbr -a -g gp "git push"
abbr -a -g gpd "git push -d origin"
abbr -a -g gpr "git remote prune origin"
# abbr -a -g gpu "git push -u origin"
# abbr -a -g glp "git lfs pull"
# abbr -a -g glm "gss git merge ; glp"
# abbr -a -g gd "git diff"
# abbr -a -g gdh "git diff HEAD"
# abbr -a -g gm "git merge"
# abbr -a -g gms "git merge --squash"
# abbr -a -g gb "git branch"
# abbr -a -g gba "git branch -a"
# abbr -a -g gf "git fetch"
# abbr -a -g gr "git rebase"
# abbr -a -g grh "git reset --hard"
# abbr -a -g gcl "git clean -fd"
# abbr -a -g gst "git stash"
# abbr -a -g gsl "git stash list"
# abbr -a -g gsp "git stash pop"
# abbr -a -g gsu "git submodule update"
# abbr -a -g glom "git lop -10 origin/master"
# abbr -a -g gmom "git merge origin/master"
# abbr -a -g gmm "git merge master"
# abbr -a -g gss "env GIT_LFS_SKIP_SMUDGE=1"
# export NNN_FIFO="/tmp/nnn.fifo" # temporary buffer for the previews
# export NNN_PLUG='p:preview-tui'