summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Egorov <[email protected]>2025-06-17 20:48:45 +0300
committerPavel Egorov <[email protected]>2025-06-17 20:48:45 +0300
commitbc32e2126cf37aea1606f6626758860ca7eb561a (patch)
tree8f1d1181bfc11c011324c0447f8aea2f80b59403
parentaacec34425446aa2a0455cbd292de1d0b69c9de1 (diff)
downloaddotfiles-bc32e2126cf37aea1606f6626758860ca7eb561a.tar.gz
dotfiles-bc32e2126cf37aea1606f6626758860ca7eb561a.zip
[fish] run jq once to parse shadowsocks config
Diffstat (limited to '')
-rw-r--r--.config/fish/conf.d/abbr.fish3
1 files changed, 2 insertions, 1 deletions
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"
8 8
9# Added proxy flags 9# Added proxy flags
10set -l ssconfig "/etc/shadowsocks-rust/config.json" 10set -l ssconfig "/etc/shadowsocks-rust/config.json"
11set -l SSPROXY "socks5://$(jq -r .local_address $ssconfig):$(jq -r .local_port $ssconfig)" 11set -l parsed_config (jq -r .local_address,.local_port $ssconfig)
12set -l SSPROXY "socks5://$parsed_config[1]:$parsed_config[2]"
12abbr --add curlss "curl --proxy=$SSPROXY" 13abbr --add curlss "curl --proxy=$SSPROXY"
13abbr --add ytdlpss "yt-dlp --proxy=$SSPROXY" 14abbr --add ytdlpss "yt-dlp --proxy=$SSPROXY"
14 15