tags 376433 = pending
thanks

On Sun, 11 May 2008 14:19:51 +0100 (BST), Reuben Thomas wrote:

> On Sun, 11 May 2008, David Paleino wrote:
> 
> > tags 376433 wontfix moreinfo
> > thanks
> >
> > Hi Reuben, why should mkdir complete on filenames? Mkdir is a 
> > directory-only command -- am I wrong?
> 
> I often want to create a directory with a similar name to an existing file.

Thanks for the quick reply.
I understood your reasoning, and I've just committed the change which fixes
this in our Bzr repository. If you don't want to wait long for a new upload,
here's a quick patch:

--- bash_completion
+++ bash_completion.new
@@ -4154,7 +4154,7 @@
                COMPREPLY=( $( $1 --help 2>&1 | sed -e '/--/!d' \
                                -e 's/.*\(--[-A-Za-z0-9]\+=\?\).*/\1/' | \
                               command grep "^$cur" | sort -u ) )
-       elif [[ "$1" == @(mk|rm)dir ]]; then
+       elif [[ "$1" == rmdir ]]; then
                _filedir -d
        else
                _filedir


Please be warned that mkdir will fail if trying to create a directory called as
an existing filename.

Kindly,
David

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Bash-completion-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel

Reply via email to