Hi Peter, you were completely right! Now I have got some help at
stackoverflow, and it seems that helped solve this issue. There are four
things that seems must be in place to solve it:
1. compopt -o nospace
2. compopt -o filenames
3. Running compgen -f with an absolute path
4. Then
Thanks Peter! See follow-up question at stackoverflow:
http://stackoverflow.com/questions/27244300/how-to-complete-filenames-
relative-to-another-directory
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
Thanks for the thorough answer! If I add shopt -s extglob your code is
working.
The question is how to add slashes after directory names and not file names. If
I remove -o filenames and add
compopt -o nospace I still can use compgen -f $cur but it does not add
slashes. And the completions are
Was working on completions for something else, and thought of this when
I saw completions/make checking if COMPREPLY has only a single entry.
If it does, that means completion will replace the user's word, rather
than show possible completions. In that case, run compopt -o nospace.
And maybe