diff --git a/share/functions/__fish_complete_user_at_hosts.fish b/share/functions/__fish_complete_user_at_hosts.fish index 223806623..4420f92fc 100644 --- a/share/functions/__fish_complete_user_at_hosts.fish +++ b/share/functions/__fish_complete_user_at_hosts.fish @@ -1,5 +1,5 @@ function __fish_complete_user_at_hosts -d "Print list host-names with user@" - for user_at in (commandline -ct | string match -r '.*@'; or echo "")(__fish_print_hostnames) - echo $user_at - end + for user_at in (commandline -ct | string match -r '.*@'; or echo "")(__fish_print_hostnames) + echo $user_at + end end \ No newline at end of file diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index b573b26f3..437605022 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -265,7 +265,7 @@ function __fish_config_interactive -d "Initializations that should be performed if test "$VTE_VERSION" -ge 3405 -o "$TERM_PROGRAM" = "Apple_Terminal" -o "$TERM_PROGRAM" = "iTerm.app" function __update_cwd_osc --on-variable PWD --description 'Notify capable terminals when $PWD changes' if status --is-command-substitution - or set -q INSIDE_EMACS + or set -q INSIDE_EMACS return end printf \e\]7\;file://\%s\%s\a (hostname) (string escape --style=url $PWD) diff --git a/share/functions/cdh.fish b/share/functions/cdh.fish index eb6df8e29..773db10ba 100644 --- a/share/functions/cdh.fish +++ b/share/functions/cdh.fish @@ -46,7 +46,8 @@ function cdh --description "Menu based cd command" for i in (seq $dirc -1 1) set -l dir $uniq_dirs[$i] set -l label_color normal - set -q fish_color_cwd; and set label_color $fish_color_cwd + set -q fish_color_cwd + and set label_color $fish_color_cwd set -l dir_color_reset (set_color normal) set -l dir_color if test "$dir" = "$PWD" @@ -57,8 +58,7 @@ function cdh --description "Menu based cd command" if set -q home_dir[2] set dir "~$home_dir[2]" end - printf '%s %s %2d) %s %s%s%s\n' (set_color $label_color) $letters[$i] \ - $i (set_color normal) $dir_color $dir $dir_color_reset + printf '%s %s %2d) %s %s%s%s\n' (set_color $label_color) $letters[$i] $i (set_color normal) $dir_color $dir $dir_color_reset end # Ask the user which directory from their history they want to cd to. diff --git a/src/builtin_argparse.cpp b/src/builtin_argparse.cpp index 028d1cf04..55b41bb2f 100644 --- a/src/builtin_argparse.cpp +++ b/src/builtin_argparse.cpp @@ -148,10 +148,10 @@ static int parse_exclusive_args(argparse_cmd_opts_t &opts, io_streams_t &streams // This is an advanced technique that leverages the C++ STL to split the string on commas. std::wistringstream iss(raw_xflags); wcstring_list_t xflags((std::istream_iterator(iss)), - std::istream_iterator()); + std::istream_iterator()); if (xflags.size() < 2) { streams.err.append_format(_(L"%ls: exclusive flag string '%ls' is not valid\n"), - opts.name.c_str(), raw_xflags.c_str()); + opts.name.c_str(), raw_xflags.c_str()); return STATUS_CMD_ERROR; } @@ -167,7 +167,7 @@ static int parse_exclusive_args(argparse_cmd_opts_t &opts, io_streams_t &streams exclusive_set.push_back(x->second); } else { streams.err.append_format(_(L"%ls: exclusive flag '%ls' is not valid\n"), - opts.name.c_str(), flag.c_str()); + opts.name.c_str(), flag.c_str()); return STATUS_CMD_ERROR; } } @@ -235,8 +235,8 @@ static bool parse_option_spec_sep(argparse_cmd_opts_t &opts, option_spec_t *opt_ if (*(s - 1) == L'#') { if (*s != L'-') { streams.err.append_format( - _(L"%ls: Short flag '#' must be followed by '-' and a long name\n"), - opts.name.c_str()); + _(L"%ls: Short flag '#' must be followed by '-' and a long name\n"), + opts.name.c_str()); return false; } if (opts.implicit_int_flag) { @@ -639,8 +639,7 @@ static void set_argparse_result_vars(argparse_cmd_opts_t &opts) { for (size_t pos = 0; pos < long_flag.size(); pos++) { if (!iswalnum(long_flag[pos])) long_flag[pos] = L'_'; } - env_set(var_name_prefix + long_flag, *val == ENV_NULL ? NULL : val->c_str(), - ENV_LOCAL); + env_set(var_name_prefix + long_flag, *val == ENV_NULL ? NULL : val->c_str(), ENV_LOCAL); } } diff --git a/src/fish.cpp b/src/fish.cpp index f78439df2..273c85ab8 100644 --- a/src/fish.cpp +++ b/src/fish.cpp @@ -60,14 +60,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // container to hold the options specified within the command line class fish_cmd_opts_t { -public: + public: // Commands to be executed in place of interactive shell. std::vector batch_cmds; // Commands to execute after the shell's config has been read. std::vector postconfig_cmds; }; - /// If we are doing profiling, the filename to output to. static const char *s_profiling_output_filename = NULL;