mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 15:37:24 +00:00
Minor edits
darcs-hash:20051211233939-ac50b-e01a4024f70355f2b7f1b5377c6e0853997d9860.gz
This commit is contained in:
parent
5262f3ce99
commit
ddbb50acd7
2 changed files with 12 additions and 14 deletions
15
builtin.c
15
builtin.c
|
@ -11,13 +11,13 @@
|
|||
|
||||
2). Add a line like hash_put( &builtin, L"NAME", &builtin_NAME ); to builtin_init. This will enable the parser to find the builtin function.
|
||||
|
||||
3). Add a line like hash_put( desc, L"NAME", L"Frobble the bloogle" ); to the proper part of builtin_get_desc, containing a short description of what the builtin does. This description is used by the completion system.
|
||||
3). Add a line like hash_put( desc, L"NAME", L"Bla bla bla" ); to the proper part of builtin_get_desc, containing a short description of what the builtin does. This description is used by the completion system.
|
||||
|
||||
4). Create a file names doc_src/NAME.txt, contining the manual for the builtin in Doxygen-format. Check the other builtin manuals for proper syntax.
|
||||
4). Create a file doc_src/NAME.txt, containing the manual for the builtin in Doxygen-format. Check the other builtin manuals for proper syntax.
|
||||
|
||||
5). Add an entry to the BUILTIN_DOC_SRC variable of Makefile.in. Note that the entries should be sorted alpabetically!
|
||||
5). Add an entry to the BUILTIN_DOC_SRC variable of Makefile.in. Note that the entries should be sorted alphabetically!
|
||||
|
||||
6). Add an entry to the manual at the builtin-overview subsection
|
||||
6). Add an entry to the manual at the builtin-overview subsection. Note that the entries should be sorted alphabetically!
|
||||
|
||||
*/
|
||||
|
||||
|
@ -248,8 +248,6 @@ static int builtin_bind( wchar_t **argv )
|
|||
|
||||
for( i=woptind; i<argc; i++ )
|
||||
{
|
||||
// fwprintf( stderr, L"Parse binding '%ls'\n", argv[i] );
|
||||
|
||||
input_parse_inputrc_line( argv[i] );
|
||||
}
|
||||
|
||||
|
@ -1606,7 +1604,6 @@ static int builtin_read( wchar_t **argv )
|
|||
wchar_t *state;
|
||||
|
||||
nxt = wcstok( buff, (i<argc-1)?ifs:L"", &state );
|
||||
// fwprintf( stderr, L"first token %ls, %d args, start at %d\n", nxt, argc, i );
|
||||
|
||||
while( i<argc )
|
||||
{
|
||||
|
@ -1896,8 +1893,6 @@ static int builtin_cd( wchar_t **argv )
|
|||
sb_append( sb_err, L"Could not set PWD variable\n" );
|
||||
}
|
||||
|
||||
// fwprintf( stderr, L"cd '%ls' -> '%ls', set PWD to '%ls'\n", argv[1]?argv[1]:L"-", dir, env_get( L"PWD" ) );
|
||||
|
||||
free( dir );
|
||||
|
||||
return res;
|
||||
|
@ -2438,7 +2433,6 @@ static void builtin_jobs_print( job_t *j, int mode, int header )
|
|||
sb_printf( sb_out, L"%d%%\t", cpu_use(j) );
|
||||
#endif
|
||||
sb_append2( sb_out, job_is_stopped(j)?L"stopped\t":L"running\t",
|
||||
// job_is_completed(j)?L"completed\t":L"unfinished\t",
|
||||
j->command, L"\n", (void *)0 );
|
||||
}
|
||||
|
||||
|
@ -2865,7 +2859,6 @@ static int builtin_end( wchar_t **argv )
|
|||
{
|
||||
parser_pop_block();
|
||||
}
|
||||
// fwprintf( stderr, L"End with status %d\n", proc_get_last_status() );
|
||||
|
||||
|
||||
/*
|
||||
|
|
11
parser.c
11
parser.c
|
@ -598,6 +598,8 @@ wchar_t *get_filename( const wchar_t *cmd )
|
|||
{
|
||||
wchar_t *path;
|
||||
|
||||
debug( 2, L"get_filename( '%ls' )", cmd );
|
||||
|
||||
if(wcschr( cmd, '/' ) != 0 )
|
||||
{
|
||||
if( waccess( cmd, X_OK )==0 )
|
||||
|
@ -1316,7 +1318,7 @@ static int parse_job( process_t *p,
|
|||
|
||||
block_t *prev_block = current_block;
|
||||
|
||||
// debug( 2, L"begin parse_job()\n" );
|
||||
debug( 2, L"begin parse_job()\n" );
|
||||
al_init( &args );
|
||||
|
||||
current_tokenizer_pos = tok_get_pos( tok );
|
||||
|
@ -1330,6 +1332,8 @@ static int parse_job( process_t *p,
|
|||
{
|
||||
nxt = expand_one( wcsdup(tok_last( tok )),
|
||||
EXPAND_SKIP_SUBSHELL | EXPAND_SKIP_VARIABLES);
|
||||
debug( 2, L"command '%ls' -> '%ls'", tok_last( tok ), nxt?nxt:L"0" );
|
||||
|
||||
if( nxt == 0 )
|
||||
{
|
||||
error( SYNTAX_ERROR,
|
||||
|
@ -1567,6 +1571,9 @@ static int parse_job( process_t *p,
|
|||
{
|
||||
|
||||
p->actual_cmd = get_filename( (wchar_t *)al_get( &args, 0 ) );
|
||||
|
||||
debug( 2, L"filename '%ls' -> '%ls'", (wchar_t *)al_get( &args, 0 ), p->actual_cmd?p->actual_cmd:L"0" );
|
||||
|
||||
/*
|
||||
Check if the specified command exists
|
||||
*/
|
||||
|
@ -1972,8 +1979,6 @@ int eval( const wchar_t *cmd, io_data_t *io, int block_type )
|
|||
io_data_t *prev_io = block_io;
|
||||
block_io = io;
|
||||
|
||||
debug( 2, L"Eval command %ls", cmd );
|
||||
|
||||
job_reap( 0 );
|
||||
|
||||
if( !cmd )
|
||||
|
|
Loading…
Reference in a new issue