Bug 11275 - Don't print the full usage after command line error
Summary: Don't print the full usage after command line error
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-12 01:32 UTC by Josh Stone
Modified: 2010-02-19 22:13 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Stone 2010-02-12 01:32:33 UTC
When stap gets a bad argument on the command line, we print a relevant error
message and show the full usage text (which is currently 52 lines).  My
terminals are almost always shorter than that, and so the error message is
pushed into the scrollback.  It's even more annoying if I'm on a console with no
scrolling.

Better would be to print the error message followed by a simple "Try 'stap -h'
for more information."

PS: we should also have --help as an alias for -h

PPS: usage should go to stdout so "stap -h | less" does the right thing
Comment 1 Frank Ch. Eigler 2010-02-19 22:13:21 UTC
commit 83b38ce