feat: update pst function
This commit is contained in:
parent
eb34c9bce2
commit
5ce9248d26
1
desktop/configs/fish/.config/fish/conf.d/rustup.fish
Normal file
1
desktop/configs/fish/.config/fish/conf.d/rustup.fish
Normal file
@ -0,0 +1 @@
|
|||||||
|
source "$HOME/.cargo/env.fish"
|
@ -1,5 +1,6 @@
|
|||||||
if status --is-login
|
if status --is-login
|
||||||
fish_add_path ~/.local/bin
|
fish_add_path ~/.local/bin
|
||||||
|
fish_add_path "$HOME/.cargo/bin"
|
||||||
|
|
||||||
set -gx BAT_THEME "Solarized (light)"
|
set -gx BAT_THEME "Solarized (light)"
|
||||||
set -gx EDITOR "nvim"
|
set -gx EDITOR "nvim"
|
||||||
@ -11,7 +12,10 @@ if status --is-login
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if status is-interactive
|
if status is-interactive
|
||||||
|
alias cb="~/repos/cports/cbuild"
|
||||||
|
alias g="git"
|
||||||
alias ls="bash ~/scripts/elash.sh"
|
alias ls="bash ~/scripts/elash.sh"
|
||||||
|
alias l="ls -lah"
|
||||||
alias v="nvim"
|
alias v="nvim"
|
||||||
alias reboot="loginctl reboot"
|
alias reboot="loginctl reboot"
|
||||||
alias hr="date +'%Hh:%M, %d-%m-%Y'"
|
alias hr="date +'%Hh:%M, %d-%m-%Y'"
|
||||||
@ -34,7 +38,7 @@ function pst
|
|||||||
end
|
end
|
||||||
|
|
||||||
if command test -p /dev/stdin
|
if command test -p /dev/stdin
|
||||||
set file (mktemp)
|
set file "/tmp/tmp.txt"
|
||||||
if test $use_ansifilter = true
|
if test $use_ansifilter = true
|
||||||
ansifilter > $file
|
ansifilter > $file
|
||||||
else
|
else
|
||||||
@ -50,3 +54,13 @@ function pst
|
|||||||
rm "$file"
|
rm "$file"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function last_history_item
|
||||||
|
echo $history[1]
|
||||||
|
end
|
||||||
|
function last_history_arguments
|
||||||
|
set -l args (string split ' ' $history[1])
|
||||||
|
echo $args[-1]
|
||||||
|
end
|
||||||
|
abbr -a '!*' --position anywhere --function last_history_arguments
|
||||||
|
abbr -a !! --position anywhere --function last_history_item
|
||||||
|
@ -40,4 +40,4 @@ SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack
|
|||||||
SETUVAR fish_pager_color_selected_completion:\x1d
|
SETUVAR fish_pager_color_selected_completion:\x1d
|
||||||
SETUVAR fish_pager_color_selected_description:\x1d
|
SETUVAR fish_pager_color_selected_description:\x1d
|
||||||
SETUVAR fish_pager_color_selected_prefix:\x1d
|
SETUVAR fish_pager_color_selected_prefix:\x1d
|
||||||
SETUVAR fish_user_paths:/yang/\x2elocal/bin
|
SETUVAR fish_user_paths:/yang/\x2ecargo/bin\x1e/yang/\x2elocal/bin
|
||||||
|
Loading…
Reference in New Issue
Block a user