summaryrefslogtreecommitdiffstats
path: root/.config/fish/conf.d/abbr.fish
diff options
context:
space:
mode:
authorPavel Egorov <[email protected]>2025-06-23 20:04:21 +0300
committerPavel Egorov <[email protected]>2025-06-23 20:04:21 +0300
commit07a8d1a5ff04cdba62dba7c7d4d776fb830d1683 (patch)
treefe1390bd4db8fe5e32e7082d2918e2992a9c241a /.config/fish/conf.d/abbr.fish
parent413373a89982da6c4db7e19208a1ddcbcedea4e9 (diff)
downloaddotfiles-07a8d1a5ff04cdba62dba7c7d4d776fb830d1683.tar.gz
dotfiles-07a8d1a5ff04cdba62dba7c7d4d776fb830d1683.zip
[fish] do program-specific configurations conditionally
Diffstat (limited to '.config/fish/conf.d/abbr.fish')
-rw-r--r--.config/fish/conf.d/abbr.fish12
1 files changed, 7 insertions, 5 deletions
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"
7abbr --add gco "git checkout" 7abbr --add gco "git checkout"
8 8
9# Added proxy flags 9# Added proxy flags
10set -l ssconfig "/etc/shadowsocks-rust/config.json" 10if type -q sslocal
11set -l parsed_config (jq -r .local_address,.local_port $ssconfig) 11 set -l ssconfig "/etc/shadowsocks-rust/config.json"
12set -l SSPROXY "socks5://$parsed_config[1]:$parsed_config[2]" 12 set -l parsed_config (jq -r .local_address,.local_port $ssconfig)
13abbr --add curlss "curl --proxy=$SSPROXY" 13 set -l SSPROXY "socks5://$parsed_config[1]:$parsed_config[2]"
14abbr --add ytdlpss "yt-dlp --proxy=$SSPROXY" 14 abbr --add curlss "curl --proxy=$SSPROXY"
15 abbr --add ytdlpss "yt-dlp --proxy=$SSPROXY"
16end
15 17
16# Pacman 18# Pacman
17abbr --add pacman-unlock "sudo rm /var/lib/pacman/db.lck" 19abbr --add pacman-unlock "sudo rm /var/lib/pacman/db.lck"