diff options
author | axel <axel@liljencrantz.se> | 2006-05-26 21:24:02 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-05-26 21:24:02 +1000 |
commit | 17171c3277edaf893ba4fad0a71b76f46fcf7e07 (patch) | |
tree | b968f549ffdf4e642f0c26446896fc268cc60bf5 /builtin_ulimit.c | |
parent | 18a59291eda5636023eeeab16c0998e6c4e197dc (diff) |
If a help page for a builtin is showed in response to an error, make sure it fits on screen, or only print the synopsis - this patch also contains a huge number of tweaks to where and when the help pages are printed
darcs-hash:20060526112402-ac50b-88993e45f411b2f1c45b3202c393c5328f1c7429.gz
Diffstat (limited to 'builtin_ulimit.c')
-rw-r--r-- | builtin_ulimit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/builtin_ulimit.c b/builtin_ulimit.c index 80793dac..d0352193 100644 --- a/builtin_ulimit.c +++ b/builtin_ulimit.c @@ -326,6 +326,10 @@ int builtin_ulimit( wchar_t ** argv ) L"virtual-memory-size", no_argument, 0, 'v' } , + { + L"help", no_argument, 0, 'h' + } + , { 0, 0, 0, 0 } @@ -337,7 +341,7 @@ int builtin_ulimit( wchar_t ** argv ) int opt = wgetopt_long( argc, argv, - L"aHScdflmnptuv", + L"aHScdflmnptuvh", long_options, &opt_index ); if( opt == -1 ) @@ -415,6 +419,10 @@ int builtin_ulimit( wchar_t ** argv ) break; #endif + case L'h': + builtin_print_help( argv[0], sb_out ); + return 0; + case L'?': builtin_print_help( argv[0], sb_err ); return 1; |