Exec bash and reset IFS to default
This commit is contained in:
parent
d64c54f994
commit
f1573d922d
1 changed files with 3 additions and 1 deletions
|
|
@ -62,9 +62,11 @@ bashrc_forward () {
|
|||
printf %s '
|
||||
#-# If bashrc was forwarded using environment variable, unset it, since we do not need it anymore and to keep the env clean. Relaying will set it anyways to something fresh.
|
||||
unset FORWARDED_BASHRC
|
||||
#-# Set default IFS, since our staging command line may not contain double quotes since they behave weirdly in powershell.
|
||||
IFS=$(printf '\'' \t\n.'\''); IFS=${IFS%.}
|
||||
_argv_wrap () {
|
||||
if >/dev/null 2>&1 command -v bash; then
|
||||
bash -c '\''
|
||||
exec bash -c '\''
|
||||
#-# Newest Bash feature used here is parameter transformation (`${_s@A}`), introduced in Bash 4.4
|
||||
if ! ((BASH_VERSINFO[0]>4||(BASH_VERSINFO[0]==4&&BASH_VERSINFO[1]>=4))) 2>/dev/null; then
|
||||
>&2 echo "Failed to SSH with .bashrc-forwarding, the Bash version is too old."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue