mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Minor edits, remove unneeded code, add a few commants, correct spelling, tweak the todo list, etc.
darcs-hash:20061026102253-ac50b-eb42fdab9a9211d68386a563134856a96b870d90.gz
This commit is contained in:
parent
3341fc888c
commit
e98a604a21
10 changed files with 30 additions and 15 deletions
|
@ -318,20 +318,20 @@ static int al_contains_long( array_list_t *list,
|
|||
*/
|
||||
static void erase_values(array_list_t *list, array_list_t *indexes)
|
||||
{
|
||||
int i;
|
||||
long i;
|
||||
array_list_t result;
|
||||
|
||||
al_init(&result);
|
||||
|
||||
for (i = 0; i < al_get_count(list); i++)
|
||||
{
|
||||
if (!al_contains_long(indexes, (long)i + 1))
|
||||
if (!al_contains_long(indexes, i + 1))
|
||||
{
|
||||
al_push(&result, al_get(list, i));
|
||||
}
|
||||
else
|
||||
{
|
||||
free((void *) al_get(list, i));
|
||||
free( (void *)al_get(list, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -375,16 +375,22 @@ static void print_variables(int include_values, int esc, int scope)
|
|||
shorten = 1;
|
||||
value = wcsndup( value, 60 );
|
||||
if( !value )
|
||||
{
|
||||
DIE_MEM();
|
||||
}
|
||||
}
|
||||
|
||||
e_value = esc ? expand_escape_variable(value) : wcsdup(value);
|
||||
|
||||
sb_append2(sb_out, L" ", e_value, (void *)0);
|
||||
free(e_value);
|
||||
|
||||
if( shorten )
|
||||
{
|
||||
sb_append(sb_out, L"\u2026");
|
||||
free( value );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
3
common.h
3
common.h
|
@ -52,7 +52,8 @@ extern struct termios shell_modes;
|
|||
extern wchar_t ellipsis_char;
|
||||
|
||||
/**
|
||||
The verbosity of fish
|
||||
The verbosity level of fish. If a call to debug has a severity
|
||||
level higher than \c debug_level, it will not be printed.
|
||||
*/
|
||||
extern int debug_level;
|
||||
|
||||
|
|
|
@ -1314,14 +1314,14 @@ g++, javac, java, gcj, lpr, doxygen, whois, find)
|
|||
- Autoreload inputrc-file on updates
|
||||
- Right-side prompt
|
||||
- Selectable completions in the pager
|
||||
- Access to the whole history in $history
|
||||
- Saving of the history in intervals to not loose to much on crashes
|
||||
- Per process output redirection
|
||||
- Reduce the space of the pager by one line to allow the commandline to remain visible.
|
||||
- down-arrow could be used to save the current command to the history. Or give the next command in-sequnce. Or both.
|
||||
- A pretty-printer.
|
||||
- Help messages for builtin should not be compiled into fish, they should be kept in a separate directory
|
||||
- Shellscript functions should be able to show help on the commandline instead of launching a browser
|
||||
- Drop support for inputrc-files. Use shellscripts and the bind builtin. Also, redo the syntax for the bind builtin to something more sane.
|
||||
- History could reload itself when the file is updated. This would need to be done in a clever way to avoid chain reactions
|
||||
|
||||
\subsection bugs Known bugs
|
||||
|
||||
|
@ -1329,6 +1329,7 @@ g++, javac, java, gcj, lpr, doxygen, whois, find)
|
|||
- Suspending and then resuming pipelines containing a builtin is broken. How should this be handled?
|
||||
- screen handling code can't handle tabs in input
|
||||
|
||||
|
||||
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>.
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
\subsection function-description Description
|
||||
|
||||
- \c -b or \c --key-binding specifies that the function is a key biding. Key binding functions work exactly like regular functions except that they can not be tab-completed.
|
||||
- <code>-d DESCRIPTION</code> or \c --description=DESCRIPTION is a description of what the function does, suitable as a completion description
|
||||
- <code>-j PID</code> or <code> --on-job-exit PID</code> tells fish to run this function when the job with group id PID exits. Instead of PID, the string 'caller' can be specified. This is only legal when in a command substitution, and will result in the handler being triggered by the exit of the job which created this command substitution.
|
||||
- <code>-p PID</code> or <code> --on-process-exit PID</code> tells fish to run this function when the fish child process with process id PID exits
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
where FILE DESCRIPTOR may be either the number of a file descriptor, or one
|
||||
of the strings stdin, stdout and stderr.
|
||||
|
||||
If he specified file descriptor is a tty, the exit status of the
|
||||
If the specified file descriptor is a tty, the exit status of the
|
||||
command is zero, otherwise, it is non-zero.
|
||||
|
||||
|
||||
|
|
2
env.h
2
env.h
|
@ -94,7 +94,7 @@ int env_set( const wchar_t *key,
|
|||
wchar_t *env_get( const wchar_t *key );
|
||||
|
||||
/**
|
||||
Returns 1 if the specified key exists. This can't be reliable done
|
||||
Returns 1 if the specified key exists. This can't be reliably done
|
||||
using env_get, since env_get returns null for 0-element arrays
|
||||
|
||||
\param key The name of the variable to remove
|
||||
|
|
|
@ -309,8 +309,6 @@ static void get_names_internal( void *key,
|
|||
void *aux )
|
||||
{
|
||||
wchar_t *name = (wchar_t *)key;
|
||||
function_data_t *f = (function_data_t *)val;
|
||||
|
||||
if( name[0] != L'_' && !al_contains_str( (array_list_t *)aux, name ) )
|
||||
{
|
||||
al_push( (array_list_t *)aux, name );
|
||||
|
|
3
halloc.h
3
halloc.h
|
@ -11,7 +11,8 @@
|
|||
|
||||
/**
|
||||
Allocate new memory using specified parent memory context. Context
|
||||
_must_ be either 0 or the result of a previous call to halloc.
|
||||
_must_ be either 0 or the result of a previous call to halloc. The
|
||||
resulting memory is set to zero.
|
||||
|
||||
If \c context is null, the resulting block is a root block, and
|
||||
must be freed with a call to halloc_free().
|
||||
|
|
12
parser.c
12
parser.c
|
@ -1642,8 +1642,16 @@ static void parse_job_main_loop( process_t *p,
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
static void print_block_stack( block_t *b )
|
||||
{
|
||||
if( !b )
|
||||
return;
|
||||
print_block_stack( b->outer );
|
||||
|
||||
debug( 0, L"Block type %ls, skip: %d", parser_get_block_desc( b->type ), b->skip );
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
Fully parse a single job. Does not call exec on it, but any command substitutions in the job will be executed.
|
||||
|
|
3
screen.c
3
screen.c
|
@ -285,9 +285,10 @@ static void s_check_status( screen_t *s)
|
|||
to repaint. However, we do not know where the cursor is. It
|
||||
is our best bet that we are still on the same line, so we
|
||||
move to the beginning of the line, reset the modelled screen
|
||||
contents, and then set the modeled curor y-pos to its
|
||||
contents, and then set the modeled cursor y-pos to its
|
||||
earlier value.
|
||||
*/
|
||||
|
||||
int prev_line = s->actual_cursor[1];
|
||||
write( 1, "\r", 1 );
|
||||
s_reset( s );
|
||||
|
|
Loading…
Reference in a new issue