add ssh init in config.fish
This commit is contained in:
parent
80c7176887
commit
5dd46db45b
1 changed files with 9 additions and 1 deletions
|
@ -3,8 +3,16 @@
|
||||||
set -x PATH $PATH ~/.local/bin ~/.go/bin
|
set -x PATH $PATH ~/.local/bin ~/.go/bin
|
||||||
set -x EDITOR nano
|
set -x EDITOR nano
|
||||||
|
|
||||||
## Go utils
|
## SSH init
|
||||||
|
set -x SSH_AUTH_SOCK $XDG_RUNTIME_DIR/ssh-agent.socket
|
||||||
|
for f in (ls .ssh/*.pub);
|
||||||
|
set -l priv (string replace '.pub' '' $f);
|
||||||
|
if not contains $priv (ssh-add -l | awk '{ print $3 }')
|
||||||
|
ssh-add $priv
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
## Go utils
|
||||||
set -x GOPATH ~/.go
|
set -x GOPATH ~/.go
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue