diff options
author | axel <axel@liljencrantz.se> | 2006-01-19 02:47:50 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-01-19 02:47:50 +1000 |
commit | 13e94c0617842233fb2fb41ebaef9ce5a8195a4f (patch) | |
tree | ff2878f12e6e5cd08cbe570942de5c1b0a728b9e /builtin.c | |
parent | efd01ae6c60c9b4f851741da6b1ae1667ed31640 (diff) |
Don't print error message in fg if the command didn't fail
darcs-hash:20060118164750-ac50b-af59573292b32b87d0257c501eb7989062503653.gz
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -2317,7 +2317,7 @@ static void make_first( job_t *j ) static int builtin_fg( wchar_t **argv ) { job_t *j; - + if( argv[1] == 0 ) { /* @@ -2325,10 +2325,13 @@ static int builtin_fg( wchar_t **argv ) */ for( j=first_job; ((j!=0) && (!j->constructed)); j=j->next ) ; - sb_printf( sb_err, - _( L"%ls: There are no jobs\n" ), - argv[0] ); - builtin_print_help( argv[0], sb_err ); + if( !j ) + { + sb_printf( sb_err, + _( L"%ls: There are no jobs\n" ), + argv[0] ); + builtin_print_help( argv[0], sb_err ); + } } else if( argv[2] != 0 ) { @@ -2399,7 +2402,6 @@ static int builtin_fg( wchar_t **argv ) make_first( j ); j->fg=1; - job_continue( j, job_is_stopped(j) ); return 0; |