mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
a make style-all
cleanup
This commit is contained in:
parent
5e2c14e7be
commit
0dc92fbb2d
5 changed files with 14 additions and 16 deletions
|
@ -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
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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<WordDelimitedByComma, wchar_t>(iss)),
|
||||
std::istream_iterator<WordDelimitedByComma, wchar_t>());
|
||||
std::istream_iterator<WordDelimitedByComma, wchar_t>());
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<std::string> batch_cmds;
|
||||
// Commands to execute after the shell's config has been read.
|
||||
std::vector<std::string> postconfig_cmds;
|
||||
};
|
||||
|
||||
|
||||
/// If we are doing profiling, the filename to output to.
|
||||
static const char *s_profiling_output_filename = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue