From bc32e2126cf37aea1606f6626758860ca7eb561a Mon Sep 17 00:00:00 2001 From: Pavel Egorov Date: Tue, 17 Jun 2025 20:48:45 +0300 Subject: [fish] run jq once to parse shadowsocks config --- .config/fish/conf.d/abbr.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.config') diff --git a/.config/fish/conf.d/abbr.fish b/.config/fish/conf.d/abbr.fish index c37aa2a..2f3b72c 100644 --- a/.config/fish/conf.d/abbr.fish +++ b/.config/fish/conf.d/abbr.fish @@ -8,7 +8,8 @@ abbr --add gco "git checkout" # Added proxy flags set -l ssconfig "/etc/shadowsocks-rust/config.json" -set -l SSPROXY "socks5://$(jq -r .local_address $ssconfig):$(jq -r .local_port $ssconfig)" +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" -- cgit v1.3