Directory completion problems
hello, could you explain the following? ~/projects/art/dev/lib$ cd ../ .bzr/ lib/ ~/projects/art/dev/lib$ cd ../src ~/projects/art/dev/src$ Artur
Re: Directory completion problems
~/projects/art/dev/lib$ cd ../ .bzr/ lib/ ~/projects/art/dev/lib$ cd ../src ~/projects/art/dev/src$ cd ../ .bzr/ lib/ src/ ~/projects/art/dev/src$ cd ../lib ~/projects/art/dev/lib$ cd ../ .bzr/ lib/
Re: Directory completion problems
On 04/19/2012 12:28 PM, Artur Rataj wrote: ~/projects/art/dev/lib$ cd ../ .bzr/ lib/ ~/projects/art/dev/lib$ cd ../src ~/projects/art/dev/src$ cd ../ .bzr/ lib/ src/ ~/projects/art/dev/src$ cd ../lib ~/projects/art/dev/lib$ cd ../ .bzr/ lib/ Are there any symlinks? RR
Re: Directory completion problems
Yes, it appears that "lib" is indeed a symlink. Is it possible to treat it as if it were "just here" with the tab completion?
Re: Directory completion problems
On 4/19/12 7:38 AM, Artur Rataj wrote: > Yes, it appears that "lib" is indeed a symlink. Is it possible to treat it > as if it were "just here" with the tab completion? By default, bash uses a logical view of the file system, in which $PWD and pwd report the current directory using the path used to get there, and `..' in arguments to `cd' retreats one path element in pathname. Bash tries to be consistent in its treatment of `..', so there are occasional discrepancies between what bash completes to and the physical directory tree. If you don't want bash to do that by default, use `set -o physical'. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/
Re: Directory completion problems
I want the logical view, and I think there is one by now. But there is a file missing in the logical directory, when cd ../ is completed from a symlink. ~/projects/art/dev$ ls -la drwxr-xr-x 6 art art 4096 2012-02-24 16:21 .bzr lrwxrwxrwx 1 art art 18 2012-04-16 14:48 lib -> ../../hth/dev/lib/ drwxr-xr-x 2 art art 4096 2012-02-24 16:21 src ~/projects/art/dev$ cd lib/../ .bzr/ lib/ I have made a test directory, to analyse the problem: ~/a$ ls -la drwxr-xr-x 5 art art 4096 2012-04-19 14:50 . drwxr-xr-x 80 art art 4096 2012-04-19 14:48 .. drwxr-xr-x 2 art art 4096 2012-04-19 14:48 .hidden drwxr-xr-x 2 art art 4096 2012-04-19 14:50 .java lrwxrwxrwx 1 art art7 2012-04-19 14:48 symlink -> ../test ~/a$ cd symlink/../ hitting Tab gives: ~/a$ cd symlink/../.java/ It seems that .hidden and .java are treated differently, just because .java indeed exists in ../test/.., i.e. .., as opposed to .hidden. If *either* a/.java or ../.java were removed, the completion would not work. So, it looks as if the completion was allowed only to a logical AND between files in the physical and in the logical directory. I use the version 4.2.8(1)-release (x86_64-pc-linux-gnu).
crash bug report, plus complaint about bashbug
Dear bash guys, Bashbug interface was COMPLETELY useless. The emacs quit key didn't work. There were no instructions. It didn't even tell me it was emacs so I could go look it up. I had to find that out elsewhere. Eventually it wouldn't even let me edit, saying the buffer is read only. What the hell were you thinking? Why not use the EDITOR variable? That's what it's for! Not everyone knows how to use every editor. So here is an email instead, with copy & paste from what I wrote in that thing before getting annoyed and using "kill -9". From: peter To: bug-bash@gnu.org Subject: [50 character or so descriptive subject here (for reference)] Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.2 -L/home/abuild/rpmbuild/BUILD/bash-4.2/../readline-6.2 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-suse-linux-gnu' -DCONF_VENDOR='suse' -DLOCALEDIR='/usr/share/locale' -DPACKA\ GE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -D_GNU\ _SOURCE -DRECYCLES_PIDS -Wall -g -std=gnu89 -Wuninitialized -Wextra -Wno-unprototyped-calls -Wno-switch-enum -Wno-unused-variable -Wno-unused-parameter -ftree-loop-linear -pipe -fprofile-us\ e uname output: Linux peter 3.1.9-1.4-desktop #1 SMP PREEMPT Fri Jan 27 08:55:10 UTC 2012 (efb5ff4) x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-suse-linux-gnu Bash Version: 4.2 Patch Level: 10 Release Status: release Description: Running the following script crashes bash with exit code 141. The problem occurs on this openSuSE machine, and on FreeBSD with bash 4.1.10, and on Ubuntu with bash 4.1.5. Repeat-By: (2 line script, this email thing split it in 3) foo() { while IFS='' read -r line; do echo "$(date) $line" >> file.txt; done; }; exec 2> >(foo)
Re: crash bug report, plus complaint about bashbug
On 4/19/12 8:26 AM, Peter Maloney wrote: > Dear bash guys, > > Bashbug interface was COMPLETELY useless. The emacs quit key didn't work. > There were no instructions. It didn't even tell me it was emacs so I could > go look it up. I had to find that out elsewhere. Eventually it wouldn't > even let me edit, saying the buffer is read only. What the hell were you > thinking? Why not use the EDITOR variable? That's what it's for! Not > everyone knows how to use every editor. If you were to look at the bashbug script, you would see that it does use $EDITOR to edit the temporary file. If that variable's not set, it looks for $DEFEDITOR and tries to choose an intelligent default if it doesn't find either. > Bash Version: 4.2 > Patch Level: 10 > Release Status: release > > Description: > Running the following script crashes bash with exit code 141. The > problem occurs on this openSuSE machine, and on FreeBSD with bash > 4.1.10, and on Ubuntu with bash 4.1.5. > > Repeat-By: (2 line script, this email thing split it in 3) > foo() { while IFS='' read -r line; do echo "$(date) $line" >> > file.txt; done; }; > > exec 2> >(foo) I can't reproduce the crash with bash-4.2, bash-4.1, or bash-4.0 (with all the official patches applied to each version) on Mac OS X, RHEL 5, Ubuntu 10, Solaris 8, or Solaris 10. How about a stack traceback from the crash on one of your systems? Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/