Set BASHRC_FORWARD variable and remove BASH_COMPLETION_VERSINFO workaround because I fixed it in nix
This commit is contained in:
parent
728a5f14b5
commit
e99f461ce3
1 changed files with 3 additions and 4 deletions
|
|
@ -8,9 +8,8 @@ bashrc_get () {
|
|||
#-# Has some bugs, which is why we have to introduce this bashrc_get and that bashrc_load function, instead
|
||||
#-# of just embedding it inside the command substitution.
|
||||
echo "set -v"
|
||||
#-# Setting BASH_COMPLETION_VERSINFO because nixos likes to hijack your .bashrc to run bash-completion.sh, which
|
||||
#-# of course fails on remote systems, so we need a way to stop that from happening. Not perfect, but I'll accept the tradeoff.
|
||||
echo "[ \"\${BASH_COMPLETION_VERSINFO-}\" ] || BASH_COMPLETION_VERSINFO="
|
||||
#-# Marker and variable so we can slice out the original .bashrc for relaying and have custom login only for forwarded .bashrc
|
||||
echo "BASHRC_FORWARDED=1"
|
||||
#-# There's still a bug in bash at the moment regarding verbose mode not being turned on again after ${ :;}
|
||||
#-# https://www.mail-archive.com/bug-bash@gnu.org/msg35966.html
|
||||
#-# Therefore, be careful to use this new command substition syntax until it is fixed upstream!
|
||||
|
|
@ -21,7 +20,7 @@ bashrc_get () {
|
|||
bashrc_load () {
|
||||
if [ "$_s" ]; then
|
||||
#-# Relay .bashrc if it has already been forwarded
|
||||
: "${_s#*[B]ASH_COMPLETION_VERSINFO=[[:space:]]}"
|
||||
: "${_s#*[B]ASHRC_FORWARDED=1[[:space:]]}"
|
||||
printf %s "${_%[[:space:]][s]et +v*}"
|
||||
else
|
||||
#-# Warning: Your `.bashrc` MUST NOT print any error messages at all!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue