[Top][All Lists]

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

complete -o nospace

From: Ian Macdonald
Subject: complete -o nospace
Date: Mon, 29 Jul 2002 11:19:54 -0700
User-agent: Mutt/1.4i


It's nice that bash 2.05b offers the '-o nospace' option to the
'complete' built-in, but when binding a command to a shell function
for completion, use or non-use of this option only allows you the
freedom to either always append a space or never.

What would be really useful is the ability to only _sometimes_ append
a space. Unfortunately, passing '-o nospace' to compgen in the body of
the function has little effect, because the space will still be
appended by the 'complete' command, unless that, too, makes use of
this option.

This makes it really hard, for example, to write a good completion
function for cd, as when completing a partial path, no space is
desired, but when reaching the last directory in a given branch, the
space is wanted.

Are there any plans to provide this flexibility in the future?

Ian Macdonald               | Pushing 40 is exercise enough. 
address@hidden             | 

reply via email to

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