diff --git a/complete.c b/complete.c index da8924a29..cc7fa2ca2 100644 --- a/complete.c +++ b/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; diff --git a/doc_src/doc.hdr b/doc_src/doc.hdr index 9ceddfc5f..1d308f315 100644 --- a/doc_src/doc.hdr +++ b/doc_src/doc.hdr @@ -1165,7 +1165,6 @@ g++, javac, java, gcj, lpr, doxygen, whois, find) - With a bit of tweakage, quite a few of the readline key-binding functions could be implemented in shellscript. - Highlight beginning/end of block when moving over a block command - Inclusion guards for the init files to make them evaluate only once, even if the user has installed fish both in /etc and in $HOME -- Do not actually load most of the shellscript functions on startup. Only load a tiny wrapper that will load the real function when needed. This should shave of CPU-time spent on parsing 500-1000 lines of code and ~50 kB of memory on startup, and is pretty easy to implement. - Do not actually load/parse .fish_history, only mmap it and use some clever string handling. Should save ~150 kB of memory permanently, but is very hard to implement. - command specific wildcarding (use case * instead of case '*', etc.) - show the whole list of commands on using tab on an empty commandline @@ -2379,12 +2378,11 @@ silently fails in shells that don't resolve symlinked paths. \section faq-cd-autocomplete Why does the cd command autocompletion list the subdirectories of my home directory as completions? -Because they are possible completions. In fish, if you specify a -relative directory to the cd command, i.e. any path that does not -start with '.' or '/', the environment variable CD_PATH will be -examined, and any directories in this path is used as a base -direcotry. To disable this feature, use set CD_PATH . to -only use the current directory for searches. +Because they are completions. In fish, if you specify a relative +directory to the cd command, i.e. any path that does not start with +'.' or '/', the environment variable CD_PATH will be examined, and any +directories in this path is used as a base direcotry. To disable this +feature, use the command set CD_PATH ..
diff --git a/fish_pager.c b/fish_pager.c index 724e65d26..5d9ef1ec0 100644 --- a/fish_pager.c +++ b/fish_pager.c @@ -258,7 +258,6 @@ static void completion_print_item( const wchar_t *prefix, comp_t *c, int width ) int i; int written=0; -// debug( 1, L"print %ls", al_get(c->comp, 0 ) ); if( c->pref_width <= width ) { /* diff --git a/output.c b/output.c index 0aea80c4e..9c9c87131 100644 --- a/output.c +++ b/output.c @@ -313,7 +313,7 @@ int writech( wint_t ch ) if( ( ch >= ENCODE_DIRECT_BASE) && ( ch < ENCODE_DIRECT_BASE+256) ) { - buff[0] = ch- ENCODE_DIRECT_BASE; + buff[0] = ch - ENCODE_DIRECT_BASE; bytes=1; } else @@ -327,7 +327,6 @@ int writech( wint_t ch ) { return 1; } - } }