From 07a8d1a5ff04cdba62dba7c7d4d776fb830d1683 Mon Sep 17 00:00:00 2001 From: Pavel Egorov Date: Mon, 23 Jun 2025 20:04:21 +0300 Subject: [fish] do program-specific configurations conditionally --- .config/fish/conf.d/abbr.fish | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to '.config/fish/conf.d/abbr.fish') diff --git a/.config/fish/conf.d/abbr.fish b/.config/fish/conf.d/abbr.fish index 2f3b72c..c763d85 100644 --- a/.config/fish/conf.d/abbr.fish +++ b/.config/fish/conf.d/abbr.fish @@ -7,11 +7,13 @@ abbr --add ga "git add" abbr --add gco "git checkout" # Added proxy flags -set -l ssconfig "/etc/shadowsocks-rust/config.json" -set -l parsed_config (jq -r .local_address,.local_port $ssconfig) -set -l SSPROXY "socks5://$parsed_config[1]:$parsed_config[2]" -abbr --add curlss "curl --proxy=$SSPROXY" -abbr --add ytdlpss "yt-dlp --proxy=$SSPROXY" +if type -q sslocal + set -l ssconfig "/etc/shadowsocks-rust/config.json" + set -l parsed_config (jq -r .local_address,.local_port $ssconfig) + set -l SSPROXY "socks5://$parsed_config[1]:$parsed_config[2]" + abbr --add curlss "curl --proxy=$SSPROXY" + abbr --add ytdlpss "yt-dlp --proxy=$SSPROXY" +end # Pacman abbr --add pacman-unlock "sudo rm /var/lib/pacman/db.lck" -- cgit v1.3