Skip to content

Commit

Permalink
Minor edits, remove unneeded code, add a few commants, correct spelli…
Browse files Browse the repository at this point in the history
…ng, tweak the todo list, etc.

darcs-hash:20061026102253-ac50b-eb42fdab9a9211d68386a563134856a96b870d90.gz
  • Loading branch information
liljencrantz committed Oct 26, 2006
1 parent 3341fc8 commit e98a604
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 15 deletions.
12 changes: 9 additions & 3 deletions builtin_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down Expand Up @@ -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 );
}

}
}

Expand Down
3 changes: 2 additions & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 3 additions & 2 deletions doc_src/doc.hdr
Original file line number Diff line number Diff line change
Expand Up @@ -1314,21 +1314,22 @@ 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

- Completion for gcc -\#\#\# option doesn't work.
- 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:[email protected]"> [email protected]
</a>.
Expand Down
1 change: 0 additions & 1 deletion doc_src/function.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc_src/isatty.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 1 addition & 1 deletion env.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions function.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
3 changes: 2 additions & 1 deletion halloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down
12 changes: 10 additions & 2 deletions parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit e98a604

Please sign in to comment.