style cleanups (make style-all)

This commit is contained in:
Kurtis Rader 2017-06-16 21:00:24 -07:00
parent d22743dad0
commit af22bf3501
8 changed files with 51 additions and 54 deletions

View file

@ -74,7 +74,8 @@ function __fish_print_hostnames -d "Print a list of known hostnames"
end end
end end
if test -n "$new_paths"; if test -n "$new_paths"
_recursive $new_paths _recursive $new_paths
end end
end end

View file

@ -241,8 +241,8 @@ static bool builtin_bind_insert(bind_cmd_opts_t &opts, int optind, int argc, wch
return true; return true;
} }
} else { } else {
if (builtin_bind_add(argv[optind], argv + (optind + 1), argc - (optind + 1), if (builtin_bind_add(argv[optind], argv + (optind + 1), argc - (optind + 1), opts.bind_mode,
opts.bind_mode, opts.sets_bind_mode, opts.use_terminfo, streams)) { opts.sets_bind_mode, opts.use_terminfo, streams)) {
return true; return true;
} }
} }

View file

@ -37,8 +37,7 @@ struct function_cmd_opts_t {
// This command is atypical in using the "+" (REQUIRE_ORDER) option for flag parsing. // This command is atypical in using the "+" (REQUIRE_ORDER) option for flag parsing.
// This is needed due to the semantics of the -a/--argument-names flag. // This is needed due to the semantics of the -a/--argument-names flag.
static const wchar_t *short_options = L"+:a:d:e:hj:p:s:v:w:SV:"; static const wchar_t *short_options = L"+:a:d:e:hj:p:s:v:w:SV:";
static const struct woption long_options[] = { static const struct woption long_options[] = {{L"description", required_argument, NULL, 'd'},
{L"description", required_argument, NULL, 'd'},
{L"on-signal", required_argument, NULL, 's'}, {L"on-signal", required_argument, NULL, 's'},
{L"on-job-exit", required_argument, NULL, 'j'}, {L"on-job-exit", required_argument, NULL, 'j'},
{L"on-process-exit", required_argument, NULL, 'p'}, {L"on-process-exit", required_argument, NULL, 'p'},
@ -250,7 +249,7 @@ int builtin_function(parser_t &parser, io_streams_t &streams, const wcstring_lis
function_data_t d; function_data_t d;
d.name = function_name; d.name = function_name;
if (!opts.description.empty()) d.description = opts.description; if (!opts.description.empty()) d.description = opts.description;
//d.description = opts.description; // d.description = opts.description;
d.events.swap(opts.events); d.events.swap(opts.events);
d.shadow_scope = opts.shadow_scope; d.shadow_scope = opts.shadow_scope;
d.named_arguments.swap(opts.named_arguments); d.named_arguments.swap(opts.named_arguments);

View file

@ -127,8 +127,7 @@ static int parse_cmd_opts(status_cmd_opts_t &opts, int *optind, //!OCLINT(high
break; break;
} }
case 2: { case 2: {
if (!set_status_cmd(cmd, opts, STATUS_IS_INTERACTIVE_JOB_CTRL, if (!set_status_cmd(cmd, opts, STATUS_IS_INTERACTIVE_JOB_CTRL, streams)) {
streams)) {
return STATUS_CMD_ERROR; return STATUS_CMD_ERROR;
} }
break; break;

View file

@ -355,8 +355,7 @@ static std::map<char, decltype(*handle_flag_N)> flag_to_function = {
{'N', handle_flag_N}, {'a', handle_flag_a}, {'c', handle_flag_c}, {'e', handle_flag_e}, {'N', handle_flag_N}, {'a', handle_flag_a}, {'c', handle_flag_c}, {'e', handle_flag_e},
{'f', handle_flag_f}, {'i', handle_flag_i}, {'l', handle_flag_l}, {'m', handle_flag_m}, {'f', handle_flag_f}, {'i', handle_flag_i}, {'l', handle_flag_l}, {'m', handle_flag_m},
{'n', handle_flag_n}, {'q', handle_flag_q}, {'r', handle_flag_r}, {'s', handle_flag_s}, {'n', handle_flag_n}, {'q', handle_flag_q}, {'r', handle_flag_r}, {'s', handle_flag_s},
{'v', handle_flag_v} {'v', handle_flag_v}};
};
/// Parse the arguments for flags recognized by a specific string subcommand. /// Parse the arguments for flags recognized by a specific string subcommand.
static int parse_opts(options_t *opts, int *optind, int n_req_args, int argc, wchar_t **argv, static int parse_opts(options_t *opts, int *optind, int n_req_args, int argc, wchar_t **argv,

View file

@ -133,7 +133,6 @@ class wgetopter_t {
#endif #endif
}; };
/// Describe the long-named options requested by the application. The LONG_OPTIONS argument to /// Describe the long-named options requested by the application. The LONG_OPTIONS argument to
/// getopt_long or getopt_long_only is a vector of `struct option' terminated by an element /// getopt_long or getopt_long_only is a vector of `struct option' terminated by an element
/// containing a name which is zero. /// containing a name which is zero.