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

81 lines
2.8 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 emacsclient -n
# set -gx EDITOR emacsclient -n
set -gx VISUAL nvim
set -gx EDITOR nvim
set -gx MANPAGER "sh -c 'col -bx | bat -l man -p'"
set -gx DOTNET_CLI_TELEMETRY_OPTOUT 1
bind -M insert \cx restore_job
if [ (uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') ]
set -gx DISPLAY 127.0.0.1:0.0
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 && git status --untracked-files"
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 gm "git merge"
abbr -a -g gmm "git merge master"
abbr -a -g gf "git fetch"
abbr -a -g grh "git reset --hard"
abbr -a -g gcl "git clean -fd"
abbr -a -g gd "git diff"
# 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 gdh "git diff HEAD"
# abbr -a -g gms "git merge --squash"
# abbr -a -g gb "git branch"
# abbr -a -g gba "git branch -a"
# abbr -a -g gr "git rebase"
# 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 gss "env GIT_LFS_SKIP_SMUDGE=1"
# export NNN_FIFO="/tmp/nnn.fifo" # temporary buffer for the previews
# export NNN_PLUG='p:preview-tui'
complete -f -c dotnet -a "(dotnet complete)"
function vterm_printf;
printf "\e]%s\e\\" "$argv"
end
function vterm_prompt_end;
vterm_printf '51;A'(whoami)'@'(hostname)':'(pwd)
end
functions --copy fish_prompt vterm_old_fish_prompt
function fish_prompt --description 'Write out the prompt; do not replace this. Instead, put this at end of your file.'
# Remove the trailing newline from the original prompt. This is done
# using the string builtin from fish, but to make sure any escape codes
# are correctly interpreted, use %b for printf.
printf "%b" (string join " \n" (vterm_old_fish_prompt))
vterm_prompt_end
end
set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin $PATH /home/joe/.ghcup/bin # ghcup-env