[PATCH 2 of 2] bash_completion: diff: recognize the --output option

Ahmed S. Darwish darwish.07 at gmail.com
Sun Jun 30 19:33:44 UTC 2013


Hi!

On Sat, Jun 29, 2013 at 05:16:01PM -0500, Kevin Bullock wrote:
> On 28 Jun 2013, at 4:38 PM, Ahmed S. Darwish wrote:
> > 
> > [ More accurate commit log ]
> 
> Please flag your re-sends with V2, V3, etc. as you send successive
> versions. This helps us keep track of which version is current
> without having to consult the e-mail headers of each one.
>

Will do.

>
> > # Parent  af3661f6c703d11dea0b490818f33826403e6d21
> > bash_completion: diff: recognize the --output option
> > 
> > `diff --output <TAB>' now only lists the repository untracked files.
> 
> What if I've set my .diff or .patch files to be ignored?
> We probably want to fall back to bash's normal filename completion here instead, no?
> 

AFAIK that's the current behaviur; the completion script automatically
falls back to normal filename completion even if that file was not in
the suggested filename list. That is:

    hg clone http://selenic.com/repo/hello
    cd hello; mkdir patches
    (cd patches; touch first.patch second.patch)
    echo -e "syntax: glob\n*.patch\n.hgignore" > .hgignore
    # hg diff --output pa <press-TAB-here>

will automatically complete the `patches' folder name and even
suggest `first.patch' and `second.patch' as the possible candidates.
Meanwhile, doing:

    touch untracked-1.txt untracked-2.txt
    # hg diff --output <press-TAB-here>

will only suggest `untracked-1.txt' and `untracked-2.txt' as the
possible candidates.

> pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和

Regards :-),

--
Darwish
http://darwish.chasingpointers.com



More information about the Mercurial-devel mailing list