bug-bash
[Top][All Lists]
Advanced

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

tab completion and backtick operator interaction


From: Chris Abbey
Subject: tab completion and backtick operator interaction
Date: Tue, 7 May 2002 13:10:27 -0500 (CDT)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux
Compiler: gcc -I/usr/src/packages/BUILD/bash-2.05
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i386-suse-linux'
-DCONF_VENDOR='suse' -DSHELL -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I.
-I/usr/include -I. -I./include -I./lib -I/usr/include -O2 -march=i486
-mcpu=i686 -D_GNU_SOURCE -Wall -pipe
uname output: Linux chesire 2.4.18cabbey-SMP #4 SMP Tue May 7 11:31:20 CDT
2002 i686 unknown
Machine Type: i386-suse-linux

Bash Version: 2.05
Patch Level: 0
Release Status: release

Description:
Having backtick operators with spaces in them confuses tab completion.

Repeat-By:
type the following at a bash prompt:

        cd<enter>
        cd /lib/modules/`uname -r`/kern<tab>

observe that the tab completion results in something like the following:

        cd /lib/modules/`uname
/lib/modules/linux-2.4.18-cabbey-SMP/kernel/

Alternately:

        cd /tmp<enter>
        mkdir -p foo/`hostname`/bar<enter>
        mkdir -p foo/`hostname -f`/bar<enter>
        ls foo/

observe that the two directories were created correctly, thus command
execution with
space in the backtick operator is functional.

        cd foo/`hostname`/ba<tab>

observe that the resulting tab completion is something like:

        cd /tmp/foo/chesire/bar

now issue:

        cd foo/`hostname -f`/ba<tab>

observe that the results are aproximately:

        cd foo/`hostname /tmp/foo/chesire.cabbey.net/bar/



-- 
Never make a technical decision based upon the politics of the situation.
Never make a political decision based upon technical issues.
The only place these realms meet is in the mind of the unenlightened.
                        -- Geoffrey James, The Zen of Programming




reply via email to

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