Confirmation for "bin/glance clear" and "bin/glance delete <id>"

Bug #768979 reported by Édouard Thuleau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Brian Waldon

Bug Description

Glance bzr123

When I use 'glance delete <id>' or 'glance clear' a user confirmation is needed :
Delete all images? [Y/n] or Delete image 2? [Y/n]

Normally, if we put 'Y' in uppercase, it will be the default value if the user doesn't precise nothing.

$glance delete 2
Delete image 2? [Y/n]
Not deleting image 2
$ glance delete 2
Delete image 2? [Y/n] y
Deleted image 2

$ glance clear
Delete all images? [Y/n]
Not deleting any images
$ glance clear
Delete all images? [Y/n] y

Related branches

Revision history for this message
Dan Prince (dan-prince) wrote :

Hi Edouard,

I actually prefer the default to be 'no' when using 'glance clear' or 'glance delete'.

Should we simply change the text to '[y/N]' so that it is clear the default behaviour is no if the user just clicks enter?

In other words I like the existing behavior. I do however agree that the capital 'Y' makes you think yes would be the actual default.

Revision history for this message
Édouard Thuleau (ethuleau) wrote :

Hi Dan,

Yes, if you prefer the default to be 'no' when using 'glance clear' or 'glance delete'.
Just put [y/N] instead of [Y/n], it's clearer.

Brian Waldon (bcwaldon)
Changed in glance:
assignee: nobody → Brian Waldon (bcwaldon)
Jay Pipes (jaypipes)
Changed in glance:
importance: Undecided → Medium
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → diablo-1
Thierry Carrez (ttx)
Changed in glance:
milestone: diablo-1 → 2011.3
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.