mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-04 11:47:37 +00:00
config(fish): add fish completions for cli tools
This commit is contained in:
1 parent
b1fb6ee6fb
commit
7db95c2076
48 files changed
+2241
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# Start or reuse a single ssh-agent shared across shells.
|
||||
# Respects an externally provided SSH_AUTH_SOCK (systemd unit, forwarding, keyring).
|
||||
if status is-interactive; and not set -q SSH_AUTH_SOCK
|
||||
set -l env_file $HOME/.ssh/agent.env.fish
|
||||
test -r $env_file; and source $env_file
|
||||
|
||||
# ssh-add exit 2 = no agent reachable (0/1 = agent alive)
|
||||
ssh-add -l >/dev/null 2>&1
|
||||
if test $status -eq 2
|
||||
ssh-agent -c | string replace -r '^setenv (\S+) (\S+);$' 'set -gx $1 $2' | string match -rv '^echo ' >$env_file
|
||||
source $env_file
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user