bug-bash
[Top][All Lists]
Advanced

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

mkdir should not have -d completion qualifier


From: Steve Summit
Subject: mkdir should not have -d completion qualifier
Date: Mon, 10 Feb 2003 12:39:09 -0500

Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: linux
Compiler: gcc -I/usr/src/packages/BUILD/bash-2.05
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc' 
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='powerpc-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 -fsigned-char -D_GNU_SOURCE -Wall -pipe
uname output: Linux aerotwo 2.4.12 #2 Thu Oct 18 14:41:03 GMT 2001 ppc unknown
Machine Type: powerpc-suse-linux

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

Description:
        It's meaningless for filename completion of mkdir's
        argument to be limited to existing directory names,
        since mkdir's job is of course to create directories
        that aren't there (yet).

Repeat-By:
        Suppose you have a bunch of files with long, similar names:

                touch long_filename_1
                touch long_filename_2
                touch long_filename_3

        You decide to create a subdirectory to move them all to.
        The command you intend to invoke is "mkdir long_filename.dir".
        You get as far as typing

                mkdir long_f

        and, since filename completion is a powerful, useful
        feature which you use all the time, you instinctively hit
        the TAB key.  But it mysteriously does not complete
        "ilename" for you.

Fix:
        I don't have a fix, although I'm sure it'd be an obvious
        one-line deletion in a table of initial command-specific
        completion rules.  The obvious workaround is to place

                complete -r mkdir

        in one's .bashrc file.




reply via email to

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