diff --git a/fish/add-on.fish b/fish/add-on.fish index d991bee..f167f13 100644 --- a/fish/add-on.fish +++ b/fish/add-on.fish @@ -6,7 +6,18 @@ function ls --description 'alias ls to eza if possible' end end -abbr -a port 'sudo ss -tulnp | grep' -abbr -a process 'ps aux | grep' +function dotu + set -l current_dir (pwd) + + cd $HOME/.flinty + if git pull + source ~/.config/fish/config.fish + echo "Config reloaded successfully!" + end + + # 回到原位 + cd $current_dir +end -alias dotu='cd $HOME/.flinty && git pull && source ~/.config/fish/config.fish' \ No newline at end of file +abbr -a port 'sudo ss -tulnp | grep' +abbr -a process 'ps aux | grep' \ No newline at end of file