Add missing help message for a few errors in the set builtin

darcs-hash:20060603223150-ac50b-b2c731e724410a8a192655940064be307214c149.gz
This commit is contained in:
axel 2006-06-04 08:31:50 +10:00
parent 6fada015b6
commit da2a757dff

View file

@ -624,6 +624,7 @@ int builtin_set( wchar_t **argv )
{ {
free( dest ); free( dest );
sb_printf( sb_err, BUILTIN_ERR_VARNAME_ZERO, argv[0] ); sb_printf( sb_err, BUILTIN_ERR_VARNAME_ZERO, argv[0] );
builtin_print_help( argv[0], sb_err );
return 1; return 1;
} }
@ -650,6 +651,7 @@ int builtin_set( wchar_t **argv )
{ {
if( !parse_index( &indexes, argv[woptind], dest ) ) if( !parse_index( &indexes, argv[woptind], dest ) )
{ {
builtin_print_help( argv[0], sb_err );
retcode = 1; retcode = 1;
break; break;
} }
@ -662,6 +664,7 @@ int builtin_set( wchar_t **argv )
if( val_count < idx_count ) if( val_count < idx_count )
{ {
sb_printf( sb_err, _(BUILTIN_SET_ARG_COUNT), argv[0] ); sb_printf( sb_err, _(BUILTIN_SET_ARG_COUNT), argv[0] );
builtin_print_help( argv[0], sb_err );
retcode=1; retcode=1;
break; break;
} }
@ -733,6 +736,7 @@ int builtin_set( wchar_t **argv )
_(L"%ls: Values cannot be specfied with erase\n%ls\n"), _(L"%ls: Values cannot be specfied with erase\n%ls\n"),
argv[0], argv[0],
parser_current_line() ); parser_current_line() );
builtin_print_help( argv[0], sb_err );
retcode=1; retcode=1;
} }
else else