Compare commits

...

9 Commits

Author SHA1 Message Date
axel
780ecc46fc 1.18.1
darcs-hash:20051209040512-ac50b-9c39e3e1b1345caa1167a8d09e79c569d3600a7a.gz
2005-12-09 14:05:12 +10:00
axel
9b98df8310 Add history search information to documentation
darcs-hash:20051209040443-ac50b-ac75d7308947d00867950f6df74cc68907045a3b.gz
2005-12-09 14:04:43 +10:00
axel
5a8205ac2b Shorten ${foo} error message a bit
darcs-hash:20051209035042-ac50b-b71d3e2b326cf18c4520c86d6587d432230d7ac9.gz
2005-12-09 13:50:42 +10:00
axel
2490da31ce Fix missing escapes for the [] characters
darcs-hash:20051209033225-ac50b-713c8d82887fb6de4de84c980f23a19039df0cb7.gz
2005-12-09 13:32:25 +10:00
axel
092bb90569 Add minor missing completion for fish itself
darcs-hash:20051209025651-ac50b-7fce573294ed888c59c7fc6ce2bd6e4d2f822e0f.gz
2005-12-09 12:56:51 +10:00
axel
39ca027706 Do not fail make install on missing ChangeLog
darcs-hash:20051209024923-ac50b-9a998c9e221c1a2d5613498e78614fafc5c6a347.gz
2005-12-09 12:49:23 +10:00
axel
22433f2717 Completion prefix was missing one character
darcs-hash:20051209024718-ac50b-91cd117f5950726ecbf5451b415cf2f8041f689a.gz
2005-12-09 12:47:18 +10:00
axel
f6e194447d Do not stop evaluation on wildcard error
darcs-hash:20051209024116-ac50b-4053af9c2800565b752476a6cdb31d3a5c43b113.gz
2005-12-09 12:41:16 +10:00
axel
e2ed5d0977 Fix buffer inconsistency un ^U
darcs-hash:20051209024034-ac50b-a06c78f8f238f61c99ddcd4bee02f8b41af26c6c.gz
2005-12-09 12:40:34 +10:00
9 changed files with 59 additions and 32 deletions

View File

@@ -283,7 +283,9 @@ install: all
$(INSTALL) -m 644 init/fish_inputrc $(DESTDIR)$(sysconfdir)$(fishinputfile);
$(INSTALL) -m 755 -d $(DESTDIR)$(docdir)
for i in user_doc/html/* ChangeLog; do \
$(INSTALL) -m 644 $$i $(DESTDIR)$(docdir); \
if test -f $$i; then \
$(INSTALL) -m 644 $$i $(DESTDIR)$(docdir); \
fi; \
done;
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
for i in $(MANUALS); do \

View File

@@ -923,6 +923,8 @@ wchar_t *escape( const wchar_t *in,
case L'@':
case L'(':
case L')':
case L'[':
case L']':
case L'{':
case L'}':
case L'?':

View File

@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(fish,1.18.0,fish-users@lists.sf.net)
AC_INIT(fish,1.18.1,fish-users@lists.sf.net)
AC_CANONICAL_TARGET

View File

@@ -737,14 +737,16 @@ Here are some of the commands available in the editor:
- End or Ctrl-e moves to the end of line
- Left and right moves one character left or right
- Alt-left and Alt-right moves one word left or right, or moves forward/backward in the directory history if the commandline is empty
- Up and down search the command history for the previous/next command containing the string that was specified on the commandline before the search was started. If the commandline was empty when the search started, all commands match. See the <a href='#history'>history </a>section for more information on history searching.
- Alt-up and Alt-down search the command history for the previous/next token containing the token under the cursor before the search was started. If the commandline was not on a token when the search started, all tokens match. See the <a href='#history'>history </a>section for more information on history searching.
- Delete and backspace removes one character forwards or backwards
- Ctrl-c delete entire line
- Ctrl-d delete one character to the right of the cursor, unless the buffer is empty, in which case the shell will exit
- Ctrl-k move contents from cursor to end of line to <a href="#killring">killring</a>
- Ctrl-u move contents from beginning of line to cursor <a href="#killring">killring</a>
- Ctrl-k move contents from the cursor to the end of line to the <a href="#killring">killring</a>
- Ctrl-u move contents from the beginning of line to the cursor to the <a href="#killring">killring</a>
- Ctrl-l clear and repaint screen
- Ctrl-w move previous word to <a href="#killring">killring</a>
- Alt-d move next word to <a href="#killring">killring</a>
- Ctrl-w move previous word to the <a href="#killring">killring</a>
- Alt-d move next word to the <a href="#killring">killring</a>
- Alt-w prints a short description of the command under the cursor
- Alt-l lists the contents of the current directory, unless the cursor is over a directory argument, in which case the contents of that directory will be listed
- Alt-k prints a list of all key bindings
@@ -807,6 +809,14 @@ forwards and backwards in the history. If the current command line is
not empty when starting a history search, only the commands containing
the string entered into the command line are shown.
By pressing Alt-up and Alt-down, a history search is also performed,
but instead of searching for a complete commandline, each commandline
is tokenized into separate elements just like it would be before
execution, and each such token is matched agains the token under the
cursor when the search began.
History searches can be aborted by pressing the escape key.
The history is stored in the file '.fish_history'. It is automatically
read on startup and merged on program exit.
@@ -1020,7 +1030,7 @@ If you think you have found a bug not described here, please send a
report to <a href="mailto:axel@liljencrantz.se"> axel@liljencrantz.se
</a>.
\subsection Known issues
\subsection issues Known issues
Older versions of Doxygen has bugs in the man-page generation which
cause the builtin help to render incorrectly. Version 1.2.14 is known

View File

@@ -68,7 +68,7 @@ parameter expansion.
#define COMPLETE_LAST_DESC COMPLETE_SEP_STR L"Last background job"
#define COMPLETE_VAR_DESC L"Variable name is zero characters long."
#define COMPLETE_VAR2_DESC L" Did you mean {$VARIABLE}? For information on how variable expansion in fish differs from Posix variable expansion, see the manual section on variable expansion by typing 'help expand-variable'."
#define COMPLETE_VAR2_DESC L"Variable name is zero characters long. Did you mean{$VARIABLE}? To learn about variable expansion in fish, type 'help expand-variable'."
/**
String in process expansion denoting ourself

View File

@@ -1,5 +1,5 @@
complete -c fish -s c -l "command" -d "Run fish with this command"
complete -c fish -s h -l help -d "Display help and exit"
complete -c fish -l version -d "Display version and exit"
complete -c fish -s v -l version -d "Display version and exit"
complete -c fish -s i -l interactive -d "Run in interactive mode"
complete -c fish -s p -l profile -d "Output profiling information to specified file" -f

View File

@@ -202,11 +202,14 @@ void parser_push_block( int type )
/*
New blocks should be skipped if the outer block is skipped,
except TOP ans SUBST block, which open up new environments
except TOP ans SUBST block, which open up new environments. Fake
blocks should always be skipped. Rather complicated... :-(
*/
new->skip=current_block?current_block->skip:0;
if( type == TOP || type == SUBST )
new->skip = 0;
if( type == FAKE )
new->skip = 1;
new->job = 0;
@@ -658,7 +661,7 @@ wchar_t *get_filename( const wchar_t *cmd )
break;
default:
debug( 1,
L"Error while searching for command %d",
L"Error while searching for command %ls",
new_cmd );
wperror( L"access" );
}
@@ -763,13 +766,6 @@ static void print_errors()
{
int tmp;
/*
Wildcard warnings are only printed in interactive mode
*/
if( ( error_code == WILDCARD_ERROR ) && !is_interactive )
return;
debug( 0, L"%ls", err_str );
tmp = current_tokenizer_pos;
@@ -1268,11 +1264,21 @@ static void parse_job_main_loop( process_t *p,
{
if( unmatched_wildcard && !matched_wildcard )
{
error( WILDCARD_ERROR,
unmatched_pos,
WILDCARD_ERR_MSG,
unmatched );
j->wildcard_error = 1;
proc_set_last_status( 1 );
if( is_interactive && !is_block )
{
int tmp;
debug( 1, WILDCARD_ERR_MSG, unmatched );
tmp = current_tokenizer_pos;
current_tokenizer_pos = unmatched_pos;
fwprintf( stderr, L"%ls", parser_current_line() );
current_tokenizer_pos=tmp;
}
}
}
free( unmatched );
@@ -1700,7 +1706,6 @@ static int parse_job( process_t *p,
*/
while( prev_block != current_block )
parser_pop_block();
}
al_destroy( &args );
@@ -1719,9 +1724,10 @@ static int parse_job( process_t *p,
static void skipped_exec( job_t * j )
{
process_t *p;
for( p = j->first_process; p; p=p->next )
{
if( p->type )
if( p->type == INTERNAL_BUILTIN )
{
if(( wcscmp( p->argv[0], L"for" )==0) ||
( wcscmp( p->argv[0], L"switch" )==0) ||
@@ -1850,6 +1856,7 @@ static void eval_job( tokenizer *tok )
}
skip |= current_block->skip;
skip |= j->wildcard_error;
if(!skip )
{

3
proc.h
View File

@@ -134,6 +134,9 @@ typedef struct job
/** Should the exit status be negated? This flag can only be set by the not builtin. */
int negate;
/** This flag is set to one on wildcard expansion errors. It means that the current command should not be executed */
int wildcard_error;
/** Pointer to the next job */
struct job *next;
}

View File

@@ -1382,8 +1382,8 @@ static int handle_completions( array_list_t *comp )
0,
0 );
len = &data->buff[data->buff_pos]-prefix_start;
len = &data->buff[data->buff_pos]-prefix_start+1;
if( len <= PREFIX_MAX_LEN )
{
prefix = malloc( sizeof(wchar_t)*(len+1) );
@@ -1400,7 +1400,7 @@ static int handle_completions( array_list_t *comp )
;
prefix = wcsdupcat( tmp,
prefix_start + (len - PREFIX_MAX_LEN+1) );
prefix_start + (len - PREFIX_MAX_LEN) );
prefix[PREFIX_MAX_LEN] = 0;
}
@@ -2586,10 +2586,13 @@ wchar_t *reader_readline()
case R_BACKWARD_KILL_LINE:
{
wchar_t prev = data->buff[data->buff_pos];
data->buff[data->buff_pos]=0;
kill_add( data->buff );
data->buff[data->buff_pos]=prev;
wchar_t *str = wcsndup( data->buff, data->buff_pos );
if( !str )
die_mem();
kill_add( str );
free( str );
data->buff_len = wcslen(data->buff +data->buff_pos);
memmove( data->buff, data->buff +data->buff_pos, sizeof(wchar_t)*data->buff_len );
data->buff[data->buff_len]=L'\0';