mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
Various minor edits
darcs-hash:20060225022139-ac50b-9ef43f88e2266978e9b39038a6a5087ff1305509.gz
This commit is contained in:
parent
d2e11ea61d
commit
fd6bf06f15
4 changed files with 9 additions and 17 deletions
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;
|
||||
|
|
|
@ -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 <code>set CD_PATH .</code> 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 <code>set CD_PATH .</code>.
|
||||
|
||||
<hr>
|
||||
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
/*
|
||||
|
|
3
output.c
3
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue