Up.
This commit is contained in:
12
home/dot_zim/modules/jl-helper/functions/update_auth_sock
Normal file
12
home/dot_zim/modules/jl-helper/functions/update_auth_sock
Normal file
@@ -0,0 +1,12 @@
|
||||
update_auth_sock() {
|
||||
local socket_path="$(tmux show-environment | sed -n 's/^SSH_AUTH_SOCK=//p')"
|
||||
|
||||
if ! [[ "$socket_path" ]]; then
|
||||
echo 'no socket path' >&2
|
||||
return 1
|
||||
else
|
||||
export SSH_AUTH_SOCK="$socket_path"
|
||||
fi
|
||||
}
|
||||
|
||||
compdef _files update_auth_sock
|
||||
Reference in New Issue
Block a user