fix: update fish script

This commit is contained in:
2024-11-27 11:29:56 +08:00
parent 878d67c8e4
commit bb752943a5
+41 -27
View File
@@ -24,15 +24,6 @@ function add_to_path
end end
end end
function refish
echo "Updating fish configuration..."
source ~/.config/fish/config.fish
echo "Fish configuration updated!"
end
alias vifish="vim ~/.config/fish/custom.fish"
alias cdfish="cd ~/.config/fish/"
# set environment # set environment
set paths_to_check /usr/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/bin /opt/sbin /usr/syno/sbin /usr/syno/bin /usr/local/sbin $HOME/.local/bin set paths_to_check /usr/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/bin /opt/sbin /usr/syno/sbin /usr/syno/bin /usr/local/sbin $HOME/.local/bin
for path in $paths_to_check for path in $paths_to_check
@@ -50,24 +41,6 @@ if test -f ~/.config/fish/custom.fish
source ~/.config/fish/custom.fish source ~/.config/fish/custom.fish
end end
function resetp
set -e http_proxy
set -e https_proxy
set -e ftp_proxy
set -e all_proxy
set -e HTTP_PROXY
set -e HTTPS_PROXY
set -e FTP_PROXY
set -e ALL_PROXY
echo "Proxy environment variables have been reset."
export | grep -i 'proxy'
end
function showp
export | grep -i 'proxy'
end
################################################################# #################################################################
# brew # brew
set -gx HOMEBREW_BREW_GIT_REMOTE "https://mirrors.ustc.edu.cn/brew.git" set -gx HOMEBREW_BREW_GIT_REMOTE "https://mirrors.ustc.edu.cn/brew.git"
@@ -129,3 +102,44 @@ end
if status is-interactive if status is-interactive
# Commands to run in interactive sessions can go here # Commands to run in interactive sessions can go here
end end
# reload conf
function fre
source ~/.config/fish/config.fish
echo "Fish configuration updated!"
end
function refish
source ~/.config/fish/config.fish
echo "Fish configuration updated!"
end
# vi config
alias fvi="vim ~/.config/fish/custom.fish"
# cd config
alias fcd="cd ~/.config/fish/"
function punset
set -e http_proxy
set -e https_proxy
set -e ftp_proxy
set -e all_proxy
set -e HTTP_PROXY
set -e HTTPS_PROXY
set -e FTP_PROXY
set -e ALL_PROXY
echo "Proxy environment variables have been reset."
export | grep -i proxy
end
function pshow
export | grep -i proxy
end
function pset
set -e https_proxy http://127.0.0.1:7890
set -e http_proxy http://127.0.0.1:7890
set -e all_proxy socks5://127.0.0.1:7890
end