bug-bash
[Top][All Lists]
Advanced

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

Re: Directoryname completion started from '.' appends blank to direct or


From: Chet Ramey
Subject: Re: Directoryname completion started from '.' appends blank to direct ory name
Date: Wed, 24 Jul 2002 12:42:33 -0400

> Machine Type: i686-pc-cygwin
> 
> Bash Version: 2.05b
> Patch Level: 0
> Release Status: release
> 
> Description:
>       Specifying the path to a program using dir-name completion
>       from the working directory causes Bash to append a blank.
> 
> Repeat-By:
>       address@hidden ~
>       $ mkdir somedir<ENTER>
> 
>       address@hidden ~
>       $ ./so<TAB>
>       $ ./somedir <ENTER>             <=3D=3D Expands to "./somedir ".
>       bash: ./somedir: is a directory
> 
>       address@hidden ~
>       $ /bi<TAB>
>       $ /bin/                 <=3D=3D Correct: "/" is added.

Try this patch, and see if it does the right thing:

*** ../bash-2.05b/bashline.c    Tue May  7 15:52:42 2002
--- bashline.c  Wed Jul 24 12:22:57 2002
***************
*** 1053,1057 ****
--- 1053,1061 ----
          if (matches == (char **)NULL)
            rl_ignore_some_completions_function = bash_ignore_filenames;
+ #if 0
          else if (matches[1] == 0 && *matches[0] != '/')
+ #else
+         else if (matches[1] == 0 && absolute_pathname (matches[0]) == 0)
+ #endif
            /* Turn off rl_filename_completion_desired so readline doesn't
               append a slash if there is a directory with the same name

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )

Chet Ramey, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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