-cpu ? causes confusion when directory has 1-character length filenames

Bug #1022331 reported by Mikko Sivulainen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

When user is in a directory with 1-character long filenames, parameter -cpu ? causes shell to expand ? into filename, which can cause a very confused user.

One solution would be to replace/add alias to -cpu ?, for example -cpulist

Revision history for this message
Michael Tokarev (mjt+launchpad-tls) wrote :

Please take this to your shell. The queston mark is a metacharacter for any *nix shell, you should just quote or backslash it. The same question mark is not special on windows.

Thanks,

/mjt

Changed in qemu:
status: New → Invalid
Revision history for this message
Peter Maydell (pmaydell) wrote : Re: [Qemu-devel] [Bug 1022331] Re: -cpu ? causes confusion when directory has 1-character length filenames

On 8 July 2012 20:44, Michael Tokarev <email address hidden> wrote:
> Please take this to your shell. The queston mark is a metacharacter for
> any *nix shell, you should just quote or backslash it. The same
> question mark is not special on windows.

I think it's a legitimate complaint to say that this is not fantastically
friendly UI on QEMU's part though. (I've been bitten by it myself and
I've been dealing with Bourne shells for over a decade.), Picking a
string that requires metacharacter-quoting in the major shell most
people use is just a silly choice.

I've thought before that we ought to make sure we have synonyms (eg 'help')
for all the list things that currently want '?'. Then we could mark '?'
as deprecated or present for back-compatibility only.

-- PMM

Revision history for this message
Daniel Berrange (berrange) wrote :

On Sun, Jul 08, 2012 at 11:45:34PM +0100, Peter Maydell wrote:
> On 8 July 2012 20:44, Michael Tokarev <email address hidden> wrote:
> > Please take this to your shell. The queston mark is a metacharacter for
> > any *nix shell, you should just quote or backslash it. The same
> > question mark is not special on windows.
>
> I think it's a legitimate complaint to say that this is not fantastically
> friendly UI on QEMU's part though. (I've been bitten by it myself and
> I've been dealing with Bourne shells for over a decade.), Picking a
> string that requires metacharacter-quoting in the major shell most
> people use is just a silly choice.
>
> I've thought before that we ought to make sure we have synonyms (eg 'help')
> for all the list things that currently want '?'. Then we could mark '?'
> as deprecated or present for back-compatibility only.

Or just introduce another character as an alternative to '?', eg '-'
or even accept the string 'help' eg "-cpu help"

Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Revision history for this message
Peter Maydell (pmaydell) wrote :

Proposed patch that would allow '-cpu help' &co: http://patchwork.ozlabs.org/patch/169798/

Aurelien Jarno (aurel32)
Changed in qemu:
status: Invalid → Fix Committed
Aurelien Jarno (aurel32)
Changed in qemu:
status: Fix Committed → Fix Released
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.