Make sed replacements work for both BSD and GNU sed

Fixes #1411
This commit is contained in:
Nils Winkler
2019-07-31 08:49:20 +02:00
parent ad00b74f4c
commit f29a195f49
2 changed files with 12 additions and 2 deletions

View File

@@ -370,7 +370,7 @@ ssh-disable-proxy ()
group 'proxy'
if [ -f ~/.ssh/config ] ; then
sed -e's/^.*ProxyCommand/# ProxyCommand/' -i "" ~/.ssh/config
sed -e's/^.*ProxyCommand/# ProxyCommand/' "${BASH_IT_SED_I_PARAMETERS[@]}" ~/.ssh/config
echo "Disabled SSH config proxy settings"
fi
}
@@ -382,7 +382,7 @@ ssh-enable-proxy ()
group 'proxy'
if [ -f ~/.ssh/config ] ; then
sed -e's/# ProxyCommand/ ProxyCommand/' -i "" ~/.ssh/config
sed -e's/# ProxyCommand/ ProxyCommand/' "${BASH_IT_SED_I_PARAMETERS[@]}" ~/.ssh/config
echo "Enabled SSH config proxy settings"
fi
}