1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 20:40:32 +01:00

More portable ssh-agent config.

This commit is contained in:
2018-04-23 15:17:48 +02:00
parent ef3083e1d1
commit c30fc0cef3
2 changed files with 10 additions and 6 deletions

View File

@@ -105,3 +105,13 @@ export RANDFILE=$XDG_RUNTIME_DIR/rnd
export NODE_REPL_HISTORY="$XDG_CACHE_HOME/node_repl_history" export NODE_REPL_HISTORY="$XDG_CACHE_HOME/node_repl_history"
export MYSQL_HISTFILE="$XDG_CACHE_HOME/mysql_history" export MYSQL_HISTFILE="$XDG_CACHE_HOME/mysql_history"
export PSQL_HISTORY="$XDG_CACHE_HOME/psql_history" export PSQL_HISTORY="$XDG_CACHE_HOME/psql_history"
# Make sure a keyring is available
if [[ -z $SSH_AUTH_SOCK ]]; then
if [[ -n $DESKTOP_SESSION ]] && type gnome-keyring-daemon &> /dev/null; then
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
elif type ssh-agent &> /dev/null; then
eval $(ssh-agent)
fi
fi

View File

@@ -165,9 +165,3 @@ preexec ()
print -Pn "\e]0;$1\a" print -Pn "\e]0;$1\a"
fi fi
} }
# Make gnome-keyring available
if [[ -z $SSH_AUTH_SOCK ]] && type gnome-keyring-daemon &> /dev/null; then
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
fi