error in example in zenity man page

Bug #21683 reported by Chris Moore
6
Affects Status Importance Assigned to Milestone
zenity (Ubuntu)
Fix Released
Low
Daniel Holbach

Bug Description

The 'zenity' man page has this example:

       Display a progress dialog while searching for all the postscript files
       in your home directory

       find `echo $HOME` '*.ps' | zenity --progress --pulsate

That's not how find works. You need to use "-name" if you want find to find .ps
files. And what is the point of the backticks and the echo? Just "find $HOME"
is the same as "find `echo $HOME`".

This would be a better example:

       find $HOME -name '*.ps' | zenity --progress --pulsate

Revision history for this message
era (era) wrote :

I don't find that it does anything useful, still; it throws away the results from the find, and if you press "cancel" while the dialog box is up, the script (or interactive shell) where this is run from gets a SIGHUP.

 bash$ bash
 bash$ PS1='in subshell> '
 in subshell> find / | zenity --progress --pulsate
 find: /etc/lvm/archive: Permission denied
 find: /etc/lv[ Progress ]sion denied
 find: /etc/ss| [ |||| ] |n denied
 find: /var/li| [Cancel] |mission denied
 find: /var/lib/gdm: Permission denied
 find: /var/lib/slocate: Permission denied
 find: /var/lock/lvm: Permission denied
 find: /var/run/fetchmail: Permission denied
 find: /var/run/sudo: Permission denied
 Hangup
 bash$ # yes, the subshell exited with "Hangup"

(I was going to post the same bug report about the superfluous backticks, but just happened to notice this additional flaw.)

Revision history for this message
Chris Moore (dooglus) wrote :

You should really raise a new bug report for this. It's a completely different issue than the documentation bug.

Matt Zimmerman (mdz)
Changed in zenity:
assignee: nobody → dholbach
Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks Chris for your suggestion, I forwarded it upstream and will fix it in our next upload.

Changed in zenity:
status: Unconfirmed → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

upload after flight-6-freeze

Changed in zenity:
status: Confirmed → Fix Committed
Revision history for this message
Daniel Holbach (dholbach) wrote :

 zenity (2.14.0-0ubuntu2) dapper; urgency=low
 .
   * debian/patches/fix-manpage.patch:
     - fix Malone: #21683 ("error in example in zenity man page")

Changed in zenity:
status: Fix Committed → Fix Released
Revision history for this message
era (era) wrote :

For what it's worth, the HUP problem seems to be fixed too (for me on Feisty/amd64 at least)

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.