mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-13 08:27:26 +00:00
Fix formatting
This commit is contained in:
parent
03c65d7a96
commit
cf766b55cc
20 changed files with 94 additions and 88 deletions
10
builtin.cpp
10
builtin.cpp
|
@ -1617,24 +1617,24 @@ static int builtin_echo(parser_t &parser, wchar_t **argv)
|
||||||
{
|
{
|
||||||
case L'n':
|
case L'n':
|
||||||
print_newline = false;
|
print_newline = false;
|
||||||
break;
|
break;
|
||||||
case L'e':
|
case L'e':
|
||||||
interpret_special_chars = true;
|
interpret_special_chars = true;
|
||||||
break;
|
break;
|
||||||
case L's':
|
case L's':
|
||||||
// fish-specific extension,
|
// fish-specific extension,
|
||||||
// which we should try to nix
|
// which we should try to nix
|
||||||
print_spaces = false;
|
print_spaces = false;
|
||||||
break;
|
break;
|
||||||
case L'E':
|
case L'E':
|
||||||
interpret_special_chars = false;
|
interpret_special_chars = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
invalid_echo_option:
|
invalid_echo_option:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
argv++;
|
argv++;
|
||||||
|
|
|
@ -1627,7 +1627,7 @@ void completer_t::complete_param_expand(const wcstring &sstr, bool do_file)
|
||||||
|
|
||||||
if (expand_string(comp_str,
|
if (expand_string(comp_str,
|
||||||
this->completions,
|
this->completions,
|
||||||
flags ) == EXPAND_ERROR)
|
flags) == EXPAND_ERROR)
|
||||||
{
|
{
|
||||||
debug(3, L"Error while expanding string '%ls'", comp_str);
|
debug(3, L"Error while expanding string '%ls'", comp_str);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1760,7 +1760,7 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
|
||||||
// Don't do wildcard expansion for executables. See #785. So do nothing here.
|
// Don't do wildcard expansion for executables. See #785. So do nothing here.
|
||||||
}
|
}
|
||||||
else if (((flags & ACCEPT_INCOMPLETE) && (!(flags & EXPAND_SKIP_WILDCARDS))) ||
|
else if (((flags & ACCEPT_INCOMPLETE) && (!(flags & EXPAND_SKIP_WILDCARDS))) ||
|
||||||
has_wildcard)
|
has_wildcard)
|
||||||
{
|
{
|
||||||
const wchar_t *start, *rest;
|
const wchar_t *start, *rest;
|
||||||
|
|
||||||
|
|
7
fish.cpp
7
fish.cpp
|
@ -366,9 +366,12 @@ static int fish_parse_opt(int argc, char **argv, std::vector<std::string> *out_c
|
||||||
is_login |= (strcmp(argv[0], "-fish") == 0);
|
is_login |= (strcmp(argv[0], "-fish") == 0);
|
||||||
|
|
||||||
/* We are an interactive session if we are either forced, or have not been given an explicit command to execute and stdin is a tty. */
|
/* We are an interactive session if we are either forced, or have not been given an explicit command to execute and stdin is a tty. */
|
||||||
if (force_interactive) {
|
if (force_interactive)
|
||||||
|
{
|
||||||
is_interactive_session = true;
|
is_interactive_session = true;
|
||||||
} else if (is_interactive_session) {
|
}
|
||||||
|
else if (is_interactive_session)
|
||||||
|
{
|
||||||
is_interactive_session = ! has_cmd && (my_optind == argc) && isatty(STDIN_FILENO);
|
is_interactive_session = ! has_cmd && (my_optind == argc) && isatty(STDIN_FILENO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2049,7 +2049,7 @@ int parser_t::parse_job(process_t *p,
|
||||||
|
|
||||||
/* Looks like a command */
|
/* Looks like a command */
|
||||||
debug(0,
|
debug(0,
|
||||||
_( L"Unknown command '%ls'. Did you mean to run %ls with a modified environment? Try 'env %ls=%ls %ls%ls'. See the help section on the set command by typing 'help set'."),
|
_(L"Unknown command '%ls'. Did you mean to run %ls with a modified environment? Try 'env %ls=%ls %ls%ls'. See the help section on the set command by typing 'help set'."),
|
||||||
cmd,
|
cmd,
|
||||||
next_str.c_str(),
|
next_str.c_str(),
|
||||||
name_str.c_str(),
|
name_str.c_str(),
|
||||||
|
|
5
proc.h
5
proc.h
|
@ -373,7 +373,10 @@ public:
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
|
||||||
/* Returns the block IO redirections associated with the job. These are things like the IO redirections associated with the begin...end statement. */
|
/* Returns the block IO redirections associated with the job. These are things like the IO redirections associated with the begin...end statement. */
|
||||||
const io_chain_t &block_io_chain() const { return this->block_io; }
|
const io_chain_t &block_io_chain() const
|
||||||
|
{
|
||||||
|
return this->block_io;
|
||||||
|
}
|
||||||
|
|
||||||
/* Fetch all the IO redirections associated with the job */
|
/* Fetch all the IO redirections associated with the job */
|
||||||
io_chain_t all_io_redirections() const;
|
io_chain_t all_io_redirections() const;
|
||||||
|
|
|
@ -984,9 +984,9 @@ void reader_init()
|
||||||
// PCA disable VDSUSP (typically control-Y), which is a funny job control
|
// PCA disable VDSUSP (typically control-Y), which is a funny job control
|
||||||
// function available only on OS X and BSD systems
|
// function available only on OS X and BSD systems
|
||||||
// This lets us use control-Y for yank instead
|
// This lets us use control-Y for yank instead
|
||||||
#ifdef VDSUSP
|
#ifdef VDSUSP
|
||||||
shell_modes.c_cc[VDSUSP] = _POSIX_VDISABLE;
|
shell_modes.c_cc[VDSUSP] = _POSIX_VDISABLE;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue