nova.bash_completion can not complete when the name include whitespace

Bug #1395029 reported by Ikuo Kumagai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Confirmed
Low
Unassigned

Bug Description

tools/nova.bash_completion take the string for completion from

tools/nova.bash_completion#L19-21
---
                COMPLETION_CACHE=~/.novaclient/*/*-cache
                cflags="$_nova_flags "$(cat $COMPLETION_CACHE 2> /dev/null | tr '\n' ' ')
                COMPREPLY=($(compgen -W "${cflags}" -- ${cur}))
---

This logic just read the cache file and pass to "compgen".
Therefore the name separated by whitespace is treated as distributed items.
It should be treated as isolated item by each lines.

This bug related to https://bugs.launchpad.net/python-novaclient/+bug/1193049.

Loic Dachary (dachary)
summary: - nova.bash_completion can not complete the name include whitespace
+ nova.bash_completion can not complete when the name include whitespace
melanie witt (melwitt)
Changed in python-novaclient:
importance: Undecided → Low
status: New → Confirmed
Changed in python-novaclient:
assignee: nobody → Rafael Rivero (rafael-cloudscaling)
Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

No Activity from long time, assigning it to myself

Changed in python-novaclient:
assignee: Rafael Rivero (rafael-cloudscaling) → NidhiMittalHada (nidhimittal19)
Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

working on this

Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

working on it

Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

Hello Ikuo,

This is regarding nova client bashcompletion bug
https://bugs.launchpad.net/python-novaclient/+bug/1395029
I am owning.

I would request a bit more clarity from you on this bug.

I have not experience bash completion with nova commands
So may be I am missing some silly thing, kindly help.

This is my cache directory
/home/stack/.novaclient/21232f297a57a5a743894a0e4a801fc3

stack@ubuntu14-OptiPlex-3020:~/.novaclient/21232f297a57a5a743894a0e4a801fc3$ ls
cloudpipe-human-id-cache flavor-uuid-cache image-human-id-cache keypair-uuid-cache server-human-id-cache volume-uuid-cache
cloudpipe-uuid-cache hypervisor-human-id-cache image-uuid-cache migration-human-id-cache server-uuid-cache
flavor-human-id-cache hypervisor-uuid-cache keypair-human-id-cache migration-uuid-cache volume-human-id-cache
stack@ubuntu14-OptiPlex-3020:~/.novaclient/21232f297a57a5a743894a0e4a801fc3$

ALL my cache files are empty and do not have any value cached.

My Doubt is :
How to generate cache files content, some setting some flag for this ?
How to experience bash completion in novaclient ?
I mean I want to reproduce this bug how to do that ?
Can you please suggest ?

Thanks
Nidhi

Changed in python-novaclient:
assignee: NidhiMittalHada (nidhimittal19) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.