bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem in cd in bash (maybe an RFE);


From: L A Walsh
Subject: problem in cd in bash (maybe an RFE);
Date: Mon, 17 Jul 2017 17:31:32 -0700
User-agent: Thunderbird

In Bash Ver 4.4.5, cdspell is confused by non-directory
items in the same dir.


 uname -a
Linux Ishtar 4.10.8-Isht-Van #4 SMP PREEMPT Thu Apr 20 10:46:50 PDT 2017 x86_64 GNU/Linux

set -o|grep on|sed -r 's/[ ].*$//'|tr "\n" " " # (set -o "on"
vals) braceexpand hashall history interactive-comments monitor onecmd pipefail vi


 shopt -s|sed -r 's/[    ].*$//'|tr "\n" " "       # (shopts that are on)
autocd cdable_vars cdspell checkhash checkwinsize cmdhist complete_fullquote dirspell dotglob expand_aliases extglob extquote force_fignore globasciiranges globstar histappend histreedit histverify hostcomplete interactive_comments lithist login_shell no_empty_cmd_completion nocaseglob nocasematch progcomp promptvars sourcepath xpg_echo




Ex1
1   Ishtar:law/mail> cd _archive/re
2   Records/   record*
3   Ishtar:law/mail> cd _archive/rec<tab>
4 Records/ record 5 Ishtar:law/mail> cd _archive/record<tab> 6 Records/ record 7 Ishtar:law/mail> cd _archive/records<CR> # add 's' & hit return
8   -bash: cd: _archive/records: Not a directory

If I change record -> records.tmp, it works:

Ex2
1   Ishtar:law/mail> cd _archive/re<tab>
2   Records/     records.tmp
3   Ishtar:law/mail> cd _archive/records<CR>
4   _archive/Records
5   Ishtar:law/mail/_archive/Records>

If I add '*' it works:

Ex3 (continuing from Ex1#8, above):
1   Ishtar:law/mail> cd _archive/records*<CR>
2   Ishtar:law/mail/_archive/Records>

---
I'm guessing Ex3 works due to the 'nocaseglob' (?).

Ex2 seems to work due to cdspell (?).

So why does Ex1 fail?  Could it be made to work w/o
"fruity-side dishes"? (crazy/wacky side effects)  :-)

Thanks!
-l






reply via email to

[Prev in Thread] Current Thread [Next in Thread]