mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Don't print error message in fg if the command didn't fail
darcs-hash:20060118164750-ac50b-af59573292b32b87d0257c501eb7989062503653.gz
This commit is contained in:
parent
efd01ae6c6
commit
13e94c0617
1 changed files with 8 additions and 6 deletions
14
builtin.c
14
builtin.c
|
@ -2317,7 +2317,7 @@ static void make_first( job_t *j )
|
||||||
static int builtin_fg( wchar_t **argv )
|
static int builtin_fg( wchar_t **argv )
|
||||||
{
|
{
|
||||||
job_t *j;
|
job_t *j;
|
||||||
|
|
||||||
if( argv[1] == 0 )
|
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 )
|
for( j=first_job; ((j!=0) && (!j->constructed)); j=j->next )
|
||||||
;
|
;
|
||||||
sb_printf( sb_err,
|
if( !j )
|
||||||
_( L"%ls: There are no jobs\n" ),
|
{
|
||||||
argv[0] );
|
sb_printf( sb_err,
|
||||||
builtin_print_help( argv[0], sb_err );
|
_( L"%ls: There are no jobs\n" ),
|
||||||
|
argv[0] );
|
||||||
|
builtin_print_help( argv[0], sb_err );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( argv[2] != 0 )
|
else if( argv[2] != 0 )
|
||||||
{
|
{
|
||||||
|
@ -2399,7 +2402,6 @@ static int builtin_fg( wchar_t **argv )
|
||||||
|
|
||||||
make_first( j );
|
make_first( j );
|
||||||
j->fg=1;
|
j->fg=1;
|
||||||
|
|
||||||
|
|
||||||
job_continue( j, job_is_stopped(j) );
|
job_continue( j, job_is_stopped(j) );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue