diff --git a/builtin.c b/builtin.c index 68e0957cc..6bd5445d1 100644 --- a/builtin.c +++ b/builtin.c @@ -888,10 +888,10 @@ static int builtin_block( wchar_t **argv ) } /** - The builtin builtin, used for given builtins precedence over + The builtin builtin, used for giving builtins precedence over functions. Mostly handled by the parser. All this code does is some additional operational modes, such as printing a list of all - builtins. + builtins, printing help, etc. */ static int builtin_builtin( wchar_t **argv ) { diff --git a/env.c b/env.c index 55915e3be..aa2844d6b 100644 --- a/env.c +++ b/env.c @@ -467,9 +467,8 @@ static void setup_path() } sb_append( &b, - ARRAY_SEP_STR, - path_el[j], - (void *)0 ); + ARRAY_SEP_STR, + path_el[j] ); env_set( L"PATH", (wchar_t *)b.buff, ENV_GLOBAL | ENV_EXPORT ); diff --git a/reader.c b/reader.c index 19b321301..3ae6db52c 100644 --- a/reader.c +++ b/reader.c @@ -1114,7 +1114,7 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp ) { int base_len=-1; - completion_t *el = (completion_t *)al_get( comp, i ); + completion_t *el = (completion_t *)al_get( comp, i ); wchar_t *foo=0; wchar_t *baz=0; @@ -1129,11 +1129,8 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp ) parse_util_token_extent( data->buff, data->buff_pos, &begin, 0, 0, 0 ); base_len = data->buff_pos - (begin-data->buff); - } - - foo = escape( el->completion + base_len, ESCAPE_ALL | ESCAPE_NO_QUOTED ); } else @@ -1294,6 +1291,7 @@ static int handle_completions( array_list_t *comp ) } done = 1; len = 1; + break; } } diff --git a/share/config.fish.in b/share/config.fish.in index 2072cdb7e..adf25f069 100644 --- a/share/config.fish.in +++ b/share/config.fish.in @@ -17,10 +17,12 @@ set -g IFS \n\ \t # set -l configdir ~/.config + if set -q XDG_CONFIG_HOME set configdir $XDG_CONFIG_HOME end +# These are used internally by fish in various places if not set -q __fish_datadir set -g __fish_datadir @datadir@/fish end @@ -29,6 +31,9 @@ if not set -q __fish_sysconfdir set -g __fish_sysconfdir @sysconfdir@/fish end +# Set up function and completion paths. Make sure that the fish +# default functions/completions are included in the respective path. + if not set -q fish_function_path set -U fish_function_path $configdir/fish/functions @sysconfdir@/fish/functions @datadir@/fish/functions end @@ -39,8 +44,13 @@ end set __fish_help_dir @docdir@ +# # This is a Solaris-specific test to modify the PATH so that -# Posix-conformant tools are used by default. +# Posix-conformant tools are used by default. It is separate from the +# other PATH code because this directory needs to be prepended, not +# appended, since it contains POSIX-compliant replacements for various +# system utilities. +# if test -d /usr/xpg4/bin if not contains /usr/xpg4/bin $PATH