Prevent directory variable expansion
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
tmux
seems to override my default bash behavior. Suppose export someDir=/path/to/it
, then in my shell
- Hitting tab on
cd $someDir
automatically adds a front slash,cd $someDir/
. Ontmux
it does nothing, and prints$someDir
(literally). - Hitting tab on
cd $someDir/
lists the contents. Ontmux
it expands the variable. Only two more tabs show the contents.
I have double checked both are running Bash, and if pertinent, this is my config:
set -g status-style bg=black
set -g status-style fg=red
set-window-option -g xterm-keys on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
How can I reproduce the original behavior?
More info
@Kusalananda's comment made me think that tmux
might be overriding my completion settings. Hitting complete
in a normal shell lists just 2 git wrappers. tmux
shows a ton.
bash tmux
add a comment |Â
up vote
0
down vote
favorite
tmux
seems to override my default bash behavior. Suppose export someDir=/path/to/it
, then in my shell
- Hitting tab on
cd $someDir
automatically adds a front slash,cd $someDir/
. Ontmux
it does nothing, and prints$someDir
(literally). - Hitting tab on
cd $someDir/
lists the contents. Ontmux
it expands the variable. Only two more tabs show the contents.
I have double checked both are running Bash, and if pertinent, this is my config:
set -g status-style bg=black
set -g status-style fg=red
set-window-option -g xterm-keys on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
How can I reproduce the original behavior?
More info
@Kusalananda's comment made me think that tmux
might be overriding my completion settings. Hitting complete
in a normal shell lists just 2 git wrappers. tmux
shows a ton.
bash tmux
Are you sure that you are running thebash
shell both in and outsidetmux
?
â Kusalananda
Sep 11 at 7:12
@Kusalananda Good question - checked and yes.
â kabanus
Sep 11 at 7:13
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
tmux
seems to override my default bash behavior. Suppose export someDir=/path/to/it
, then in my shell
- Hitting tab on
cd $someDir
automatically adds a front slash,cd $someDir/
. Ontmux
it does nothing, and prints$someDir
(literally). - Hitting tab on
cd $someDir/
lists the contents. Ontmux
it expands the variable. Only two more tabs show the contents.
I have double checked both are running Bash, and if pertinent, this is my config:
set -g status-style bg=black
set -g status-style fg=red
set-window-option -g xterm-keys on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
How can I reproduce the original behavior?
More info
@Kusalananda's comment made me think that tmux
might be overriding my completion settings. Hitting complete
in a normal shell lists just 2 git wrappers. tmux
shows a ton.
bash tmux
tmux
seems to override my default bash behavior. Suppose export someDir=/path/to/it
, then in my shell
- Hitting tab on
cd $someDir
automatically adds a front slash,cd $someDir/
. Ontmux
it does nothing, and prints$someDir
(literally). - Hitting tab on
cd $someDir/
lists the contents. Ontmux
it expands the variable. Only two more tabs show the contents.
I have double checked both are running Bash, and if pertinent, this is my config:
set -g status-style bg=black
set -g status-style fg=red
set-window-option -g xterm-keys on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
How can I reproduce the original behavior?
More info
@Kusalananda's comment made me think that tmux
might be overriding my completion settings. Hitting complete
in a normal shell lists just 2 git wrappers. tmux
shows a ton.
bash tmux
bash tmux
edited Sep 11 at 7:25
asked Sep 11 at 7:10
kabanus
1406
1406
Are you sure that you are running thebash
shell both in and outsidetmux
?
â Kusalananda
Sep 11 at 7:12
@Kusalananda Good question - checked and yes.
â kabanus
Sep 11 at 7:13
add a comment |Â
Are you sure that you are running thebash
shell both in and outsidetmux
?
â Kusalananda
Sep 11 at 7:12
@Kusalananda Good question - checked and yes.
â kabanus
Sep 11 at 7:13
Are you sure that you are running the
bash
shell both in and outside tmux
?â Kusalananda
Sep 11 at 7:12
Are you sure that you are running the
bash
shell both in and outside tmux
?â Kusalananda
Sep 11 at 7:12
@Kusalananda Good question - checked and yes.
â kabanus
Sep 11 at 7:13
@Kusalananda Good question - checked and yes.
â kabanus
Sep 11 at 7:13
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
I'm not using tmux, but what I found (with horror) is that it's re-enabling the "programmable completion" of bash that I had long commented out in /etc/bash.bashrc
-- thence the puzzling behavior you observed.
That's because tmux is exec'ing bash as a login shell (with argv[0]
set to -bash
) which is causing it to source /etc/profile
and then /etc/profile.d/bash_completion.sh
.
You have too options:
a) make the completion behavior the one you like in both login and non-login shells by editing .bash_profile
and .bashrc
b) convince tmux not to run a login shell, eg. by
set -g default-command "/bin/bash"
in .tmux.conf
That is CRAZY. Are there any repercussions you are aware of? I found this, which seems to be no: superuser.com/questions/968942/â¦
â kabanus
Sep 11 at 13:55
LOL. I'm using gnu screen, which does NOT start login shells by default. Neither does the terminal emulator (mlterm). Maybe I should check my head ;-)
â mosvy
Sep 11 at 14:01
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
I'm not using tmux, but what I found (with horror) is that it's re-enabling the "programmable completion" of bash that I had long commented out in /etc/bash.bashrc
-- thence the puzzling behavior you observed.
That's because tmux is exec'ing bash as a login shell (with argv[0]
set to -bash
) which is causing it to source /etc/profile
and then /etc/profile.d/bash_completion.sh
.
You have too options:
a) make the completion behavior the one you like in both login and non-login shells by editing .bash_profile
and .bashrc
b) convince tmux not to run a login shell, eg. by
set -g default-command "/bin/bash"
in .tmux.conf
That is CRAZY. Are there any repercussions you are aware of? I found this, which seems to be no: superuser.com/questions/968942/â¦
â kabanus
Sep 11 at 13:55
LOL. I'm using gnu screen, which does NOT start login shells by default. Neither does the terminal emulator (mlterm). Maybe I should check my head ;-)
â mosvy
Sep 11 at 14:01
add a comment |Â
up vote
1
down vote
accepted
I'm not using tmux, but what I found (with horror) is that it's re-enabling the "programmable completion" of bash that I had long commented out in /etc/bash.bashrc
-- thence the puzzling behavior you observed.
That's because tmux is exec'ing bash as a login shell (with argv[0]
set to -bash
) which is causing it to source /etc/profile
and then /etc/profile.d/bash_completion.sh
.
You have too options:
a) make the completion behavior the one you like in both login and non-login shells by editing .bash_profile
and .bashrc
b) convince tmux not to run a login shell, eg. by
set -g default-command "/bin/bash"
in .tmux.conf
That is CRAZY. Are there any repercussions you are aware of? I found this, which seems to be no: superuser.com/questions/968942/â¦
â kabanus
Sep 11 at 13:55
LOL. I'm using gnu screen, which does NOT start login shells by default. Neither does the terminal emulator (mlterm). Maybe I should check my head ;-)
â mosvy
Sep 11 at 14:01
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I'm not using tmux, but what I found (with horror) is that it's re-enabling the "programmable completion" of bash that I had long commented out in /etc/bash.bashrc
-- thence the puzzling behavior you observed.
That's because tmux is exec'ing bash as a login shell (with argv[0]
set to -bash
) which is causing it to source /etc/profile
and then /etc/profile.d/bash_completion.sh
.
You have too options:
a) make the completion behavior the one you like in both login and non-login shells by editing .bash_profile
and .bashrc
b) convince tmux not to run a login shell, eg. by
set -g default-command "/bin/bash"
in .tmux.conf
I'm not using tmux, but what I found (with horror) is that it's re-enabling the "programmable completion" of bash that I had long commented out in /etc/bash.bashrc
-- thence the puzzling behavior you observed.
That's because tmux is exec'ing bash as a login shell (with argv[0]
set to -bash
) which is causing it to source /etc/profile
and then /etc/profile.d/bash_completion.sh
.
You have too options:
a) make the completion behavior the one you like in both login and non-login shells by editing .bash_profile
and .bashrc
b) convince tmux not to run a login shell, eg. by
set -g default-command "/bin/bash"
in .tmux.conf
edited Sep 11 at 9:39
answered Sep 11 at 9:17
mosvy
1,54719
1,54719
That is CRAZY. Are there any repercussions you are aware of? I found this, which seems to be no: superuser.com/questions/968942/â¦
â kabanus
Sep 11 at 13:55
LOL. I'm using gnu screen, which does NOT start login shells by default. Neither does the terminal emulator (mlterm). Maybe I should check my head ;-)
â mosvy
Sep 11 at 14:01
add a comment |Â
That is CRAZY. Are there any repercussions you are aware of? I found this, which seems to be no: superuser.com/questions/968942/â¦
â kabanus
Sep 11 at 13:55
LOL. I'm using gnu screen, which does NOT start login shells by default. Neither does the terminal emulator (mlterm). Maybe I should check my head ;-)
â mosvy
Sep 11 at 14:01
That is CRAZY. Are there any repercussions you are aware of? I found this, which seems to be no: superuser.com/questions/968942/â¦
â kabanus
Sep 11 at 13:55
That is CRAZY. Are there any repercussions you are aware of? I found this, which seems to be no: superuser.com/questions/968942/â¦
â kabanus
Sep 11 at 13:55
LOL. I'm using gnu screen, which does NOT start login shells by default. Neither does the terminal emulator (mlterm). Maybe I should check my head ;-)
â mosvy
Sep 11 at 14:01
LOL. I'm using gnu screen, which does NOT start login shells by default. Neither does the terminal emulator (mlterm). Maybe I should check my head ;-)
â mosvy
Sep 11 at 14:01
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f468184%2fprevent-directory-variable-expansion%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Are you sure that you are running the
bash
shell both in and outsidetmux
?â Kusalananda
Sep 11 at 7:12
@Kusalananda Good question - checked and yes.
â kabanus
Sep 11 at 7:13