Comment 5 for bug 977232

Revision history for this message
Norbert Preining (preining) wrote : Re: [Bug 977232] Re: opening new tab does not keep working directory

Hi David,

once more me ...

On Do, 12 Apr 2012, Norbert Preining wrote:
> On Mi, 11 Apr 2012, David Gómez wrote:
> > I'll take back my words. It's not confirmed. I've been testing with bash
> > and zsh in 3.0.3. The working directory is kept when a new tab is
> > opened. There is only one case where it doesn't work, and it's when a
> > subshell is executed, the current working directory is changed and a
> > new tab is opened. And that is a expected behaviour.
>
> What do you mean with "a subshell is executed"?
> Or in other words, how to fix bash so that a new tab keeps the CWD?

I have now set "set -x" in /etc/bash.bashrc, /etc/profile and I don't
see anything specific in a new tab that draws my attention. The process
is running
 bash
without any arguments (so no login shell or so).

The output after setting the -x is:
+ '[' -z '\s-\v\$ ' ']'
+ shopt -s checkwinsize
+ '[' -z '' ']'
+ '[' -r /etc/debian_chroot ']'
+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+ '[' -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ']'
+ '[' -z '${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' ']'
+ export HISTCONTROL=ignoreboth,ignoredups
+ HISTCONTROL=ignoreboth,ignoredups
+ export HISTCONTROL=ignoreboth
+ HISTCONTROL=ignoreboth
+ shopt -s histappend
+ shopt -s checkwinsize
+ '[' -z '' ']'
+ '[' -r /etc/debian_chroot ']'
+ case "$TERM" in
+ '[' -n '' ']'
+ '[' '' = yes ']'
+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+ unset color_prompt force_color_prompt
+ case "$TERM" in
+ PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+ '[' -x /usr/bin/dircolors ']'
++ dircolors -b
+ eval 'LS_COLORS='\''rs=0:di=0...............................
++ export LS_COLORS
+ alias 'ls=ls --color=auto'
+ . /etc/profile
++ set -x
+++ id -u
++ '[' 1000 -eq 0 ']'
++ PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
++ '[' '\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' ']'
++ '[' /bin/bash ']'
++ PS1='\u@\h:\w\$ '
++ export PATH
++ umask 022
++ '[' -r /etc/profile.local ']'
++ . /etc/profile.local
+++ export PATH
++++ lesspipe
+++ eval export 'LESSOPEN="|' /usr/bin/lesspipe '%s";' export 'LESSCLOSE="/usr/bin/lesspipe' %s '%s";'
++++ export 'LESSOPEN=| /usr/bin/lesspipe %s'
++++ LESSOPEN='| /usr/bin/lesspipe %s'
++++ export 'LESSCLOSE=/usr/bin/lesspipe %s %s'
++++ LESSCLOSE='/usr/bin/lesspipe %s %s'
+++ unset PROMPT_COMMAND
+++ PS1='\u@\h:\n[\w] '
+++ PS2='\w_ '
+++ IGNOREEOF=0
+++ alias 'ls=ls -F'
+++ alias 'la=ls -a'
+++ alias 'll=ls -l'
+++ alias 'l=ls -la'
+++ alias 'j=jobs -l'
+++ alias pu=pushd
+++ alias po=popd
+++ alias bye=exit
+++ alias more=less
+++ alias m=/bin/more
+++ alias 'unix2dos=recode latin1...latin1/cl'
+++ alias 'dos2unix=recode latin1/cl...latin1'
+++ export 'LESS=-q -q -q -q '
+++ LESS='-q -q -q -q '
+++ umask 022
+ export <email address hidden>
+ <email address hidden>
+ export 'DEBFULLNAME=Norbert Preining'
+ DEBFULLNAME='Norbert Preining'
+ export TEX_CATALOGUE=/src/TeX/texcatalogue-svn/entries
+ TEX_CATALOGUE=/src/TeX/texcatalogue-svn/entries
+ export CTAN=/src/TeX/CTAN
+ CTAN=/src/TeX/CTAN
+ export PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/src/TeX/texlive-svn/Master/tlpkg/bin
+ PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/src/TeX/texlive-svn/Master/tlpkg/bin
+ export 'LESS=-q -q -q -q -q '
+ LESS='-q -q -q -q -q '

Do you see anything problematic?

Best wishes

Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
Your file was so big.
It might be very useful.
But now it is gone.
                       --- Windows Error Haiku