start: forward command line args to the shell
This commit is contained in:
parent
6ef0a61a7a
commit
0a79fc285a
1 changed files with 11 additions and 3 deletions
|
@ -25,10 +25,15 @@ while getopts ":wh" arg; do
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$WSL_SSH_AGENT" = true ]; then
|
||||
SHLVL=0 exec ssh-agent "$SHELL"
|
||||
if [ "$#" -gt 0 ]; then
|
||||
SHLVL=0 exec ssh-agent "$SHELL" -c "$@"
|
||||
else
|
||||
SHLVL=0 exec ssh-agent "$SHELL"
|
||||
fi
|
||||
fi
|
||||
|
||||
require() {
|
||||
|
@ -46,5 +51,8 @@ require npiperelay
|
|||
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
|
||||
[ -S "$SSH_AUTH_SOCK" ] && rm "$SSH_AUTH_SOCK"
|
||||
socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay -ei -s //./pipe/openssh-ssh-agent",nofork &
|
||||
SHLVL=0 exec "$SHELL"
|
||||
|
||||
if [ "$#" -gt 0 ]; then
|
||||
SHLVL=0 exec "$SHELL" -c "$@"
|
||||
else
|
||||
SHLVL=0 exec "$SHELL"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue