mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
Various minor edits
darcs-hash:20060225022139-ac50b-9ef43f88e2266978e9b39038a6a5087ff1305509.gz
This commit is contained in:
10
complete.c
10
complete.c
@@ -395,7 +395,6 @@ void complete_add( const wchar_t *cmd,
|
||||
c->short_opt_str = wcsdup(L"");
|
||||
}
|
||||
|
||||
/* wprintf( L"Add completion to option (short %lc, long %ls)\n", short_opt, long_opt );*/
|
||||
if( !(opt = malloc( sizeof( complete_entry_opt ) )))
|
||||
{
|
||||
die_mem();
|
||||
@@ -654,7 +653,7 @@ int complete_is_valid_option( const wchar_t *str,
|
||||
Make sure completions are loaded for the specified command
|
||||
*/
|
||||
complete_load( cmd, 0 );
|
||||
|
||||
|
||||
for( i=first_entry; i; i=i->next )
|
||||
{
|
||||
wchar_t *match = i->cmd_type?path:cmd;
|
||||
@@ -1956,11 +1955,10 @@ void complete( const wchar_t *cmd,
|
||||
|
||||
if( !done )
|
||||
{
|
||||
|
||||
pos = cursor_pos-(begin-cmd);
|
||||
|
||||
|
||||
buff = wcsndup( begin, end-begin );
|
||||
|
||||
|
||||
if( !buff )
|
||||
done=1;
|
||||
}
|
||||
@@ -2025,7 +2023,6 @@ void complete( const wchar_t *cmd,
|
||||
|
||||
if( current_token && current_command && prev_token )
|
||||
{
|
||||
|
||||
if( on_command )
|
||||
{
|
||||
/* Complete command filename */
|
||||
@@ -2052,7 +2049,6 @@ void complete( const wchar_t *cmd,
|
||||
free( current_token );
|
||||
free( current_command );
|
||||
free( prev_token );
|
||||
|
||||
}
|
||||
|
||||
error_max=old_error_max;
|
||||
|
||||
Reference in New Issue
Block a user