Fish improvements: path, rustup, wget, sql functions, and clean up

This commit is contained in:
Joseph Ferano 2023-03-15 13:37:20 +07:00
parent 4a997ee644
commit 38232c81ab
6 changed files with 11 additions and 13 deletions

View File

@ -15,11 +15,6 @@ set -gx DOTNET_CLI_TELEMETRY_OPTOUT 1
bind \cx 'if test -z (commandline) ; fg %1 &>/dev/null; else ; clear; commandline "╰─>$ "; end' bind \cx 'if test -z (commandline) ; fg %1 &>/dev/null; else ; clear; commandline "╰─>$ "; end'
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 gs "git status --untracked-files"
abbr -a -g gl "git lop -10" abbr -a -g gl "git lop -10"
abbr -a -g gll "git lol -15" abbr -a -g gll "git lol -15"
@ -78,8 +73,3 @@ function fish_prompt --description 'Write out the prompt; do not replace this. I
printf "%b" (string join " \n" (vterm_old_fish_prompt)) printf "%b" (string join " \n" (vterm_old_fish_prompt))
vterm_prompt_end vterm_prompt_end
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
# opam configuration
source /home/joe/.local/share/opam/opam-init/init.fish > /dev/null 2> /dev/null; or true

View File

@ -3,6 +3,8 @@
SETUVAR --export CARGO_HOME:/home/joe/\x2elocal/share/bin/cargo/ SETUVAR --export CARGO_HOME:/home/joe/\x2elocal/share/bin/cargo/
SETUVAR EDITOR:hx SETUVAR EDITOR:hx
SETUVAR --export LC_COLLATE:C SETUVAR --export LC_COLLATE:C
SETUVAR --export PYTHONSTARTUP:/etc/python/pythonrc
SETUVAR --export RUSTUP_HOME:/home/joe/\x2elocal/share/rustup/
SETUVAR XDG_CACHE_HOME:/home/joe/\x2ecache SETUVAR XDG_CACHE_HOME:/home/joe/\x2ecache
SETUVAR XDG_CONFIG_HOME:/home/joe/\x2econfig SETUVAR XDG_CONFIG_HOME:/home/joe/\x2econfig
SETUVAR XDG_DATA_HOME:/home/joe/\x2elocal/share SETUVAR XDG_DATA_HOME:/home/joe/\x2elocal/share
@ -36,4 +38,4 @@ SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_paths:/home/joe/\x2elocal/share/bin/cargo/bin\x1e/home/joe/\x2elocal/share/solana/install/active_release/bin\x1e/home/joe/\x2elocal/bin SETUVAR fish_user_paths:/home/joe/\x2elocal/share/bin/cargo/bin\x1e\x1e/home/joe/\x2elocal/bin

View File

@ -1,4 +1,4 @@
function listpaths function fish_listpaths
for p in $PATH for p in $PATH
echo $p echo $p
end end

View File

@ -0,0 +1,3 @@
function rustup --wraps='RUSTUP_HOME=/home/joe/.local/share/rustup/ /home/joe/.local/share/bin/cargo/bin/rustup' --description 'alias rustup RUSTUP_HOME=/home/joe/.local/share/rustup/ /home/joe/.local/share/bin/cargo/bin/rustup'
RUSTUP_HOME=/home/joe/.local/share/rustup/ /home/joe/.local/share/bin/cargo/bin/rustup $argv
end

View File

@ -1,3 +1,3 @@
function sql function sql
SQLITE_HISTORY="$XDG_CACHE_HOME"/sqlite_history sqlite3 -init "$XDG_CONFIG_HOME"/sqlite3/sqliterc SQLITE_HISTORY="$XDG_CACHE_HOME"/sqlite_history sqlite3 -init "$XDG_CONFIG_HOME"/sqlite3/sqliterc "$argv"
end end

View File

@ -0,0 +1,3 @@
function wget --description 'alias wget wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
command wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" $argv
end