aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-25 12:21:39 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-25 12:21:39 +1000
commitfd6bf06f153157b8603f816276fc04fd34337286 (patch)
tree8c2d95e5f3869a01efd578933581dc6192ccaa17
parentd2e11ea61d23e8c12f2601c48781617f07d4b46e (diff)
Various minor edits
darcs-hash:20060225022139-ac50b-9ef43f88e2266978e9b39038a6a5087ff1305509.gz
-rw-r--r--complete.c10
-rw-r--r--doc_src/doc.hdr12
-rw-r--r--fish_pager.c1
-rw-r--r--output.c3
4 files changed, 9 insertions, 17 deletions
diff --git a/complete.c b/complete.c
index da8924a2..cc7fa2ca 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 9ceddfc5..1d308f31 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 <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>
diff --git a/fish_pager.c b/fish_pager.c
index 724e65d2..5d9ef1ec 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 0aea80c4..9c9c8713 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;
}
-
}
}