fish-shell/src
ridiculousfish 0f7bba5f0e Introduce operation_context_t
This commit recognizes an existing pattern: many operations need some
combination of a set of variables, a way to detect cancellation, and
sometimes a parser. For example, tab completion needs a parser to execute
custom completions, the variable set, should cancel on SIGINT. Background
autosuggestions don't need a parser, but they do need the variables and
should cancel if the user types something new. Etc.

This introduces a new triple operation_context_t that wraps these concepts
up. This simplifies many method signatures and argument passing.
2020-01-16 15:21:28 -08:00
..
widecharwidth Fix mismatched wchar_t sign comparison errors on some platforms 2019-12-18 12:32:04 -06:00
autoload.cpp Initialize a const variable 2019-08-16 17:50:41 -07:00
autoload.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin.cpp Use completion_list_t naming everywhere 2020-01-16 15:18:49 -08:00
builtin.h Use completion_list_t naming everywhere 2020-01-16 15:18:49 -08:00
builtin_argparse.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
builtin_argparse.h implement argparse builtin 2017-07-12 22:38:24 -07:00
builtin_bg.cpp Introduce the internal jobs for functions 2019-12-31 10:08:50 -08:00
builtin_bg.h split builtin bg into its own module 2017-06-16 21:01:56 -07:00
builtin_bind.cpp [clang-tidy] Convert loops to range based 2019-11-25 14:50:40 -08:00
builtin_bind.h Allow binding nul (zero byte) 2019-09-14 16:37:57 -07:00
builtin_block.cpp Make block_type_t an enum class 2019-12-22 15:37:14 -08:00
builtin_block.h split builtin block into its own module 2017-06-16 21:01:56 -07:00
builtin_builtin.cpp [clang-tidy] Convert loops to range based 2019-11-25 14:50:40 -08:00
builtin_builtin.h split builtin builtin into its own module 2017-06-16 21:01:56 -07:00
builtin_cd.cpp [clang-tidy] C to C++ headers 2019-11-25 14:17:49 -08:00
builtin_cd.h split builtin cd into its own module 2017-06-16 21:01:56 -07:00
builtin_command.cpp [clang-tidy] Convert loops to range based 2019-11-25 14:50:40 -08:00
builtin_command.h split builtin command into its own module 2017-06-16 21:01:56 -07:00
builtin_commandline.cpp Place fish in its own process group when launched with -i 2019-12-23 10:32:37 +01:00
builtin_commandline.h Reformat all files 2019-05-05 12:09:25 +02:00
builtin_complete.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
builtin_complete.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_contains.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
builtin_contains.h split builtin contains into its own module 2017-06-16 21:01:56 -07:00
builtin_disown.cpp Introduce the internal jobs for functions 2019-12-31 10:08:50 -08:00
builtin_disown.h split builtin disown into its own module 2017-06-16 21:01:56 -07:00
builtin_echo.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
builtin_echo.h split builtin echo into its own module 2017-06-16 21:01:56 -07:00
builtin_emit.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_emit.h split builtin emit into its own module 2017-06-16 21:01:56 -07:00
builtin_eval.cpp [clang-tidy] Add const to reference 2019-12-26 21:37:15 -08:00
builtin_eval.h Re-implement eval as a regular builtin 2019-04-12 07:04:15 -05:00
builtin_exit.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
builtin_exit.h split builtin exit into its own module 2017-06-16 21:01:56 -07:00
builtin_fg.cpp Introduce the internal jobs for functions 2019-12-31 10:08:50 -08:00
builtin_fg.h split builtin fg into its own module 2017-06-16 21:01:56 -07:00
builtin_function.cpp Properly print leading comments and indentation in functions 2020-01-03 14:40:28 -08:00
builtin_function.h Properly print leading comments and indentation in functions 2020-01-03 14:40:28 -08:00
builtin_functions.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
builtin_functions.h split builtin functions into its own module 2017-06-16 21:01:56 -07:00
builtin_history.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
builtin_history.h split builtin history into its own module 2017-06-16 21:01:56 -07:00
builtin_jobs.cpp Introduce the internal jobs for functions 2019-12-31 10:08:50 -08:00
builtin_jobs.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_math.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
builtin_math.h Implement bare minimum builtin math command 2017-08-23 14:43:45 -07:00
builtin_printf.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
builtin_printf.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_pwd.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
builtin_pwd.h split builtin pwd into its own module 2017-06-16 21:01:56 -07:00
builtin_random.cpp [clang-tidy] C to C++ headers 2019-11-25 14:17:49 -08:00
builtin_random.h split builtin random into its own module 2017-06-16 21:01:56 -07:00
builtin_read.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
builtin_read.h split builtin status and read into its own module 2017-06-16 21:01:56 -07:00
builtin_realpath.cpp [clang-tidy] C to C++ headers 2019-11-25 14:17:49 -08:00
builtin_realpath.h split builtin realpath into its own module 2017-06-16 21:01:56 -07:00
builtin_return.cpp Make block_type_t an enum class 2019-12-22 15:37:14 -08:00
builtin_return.h split builtin return into its own module 2017-06-16 21:01:56 -07:00
builtin_set.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
builtin_set.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_set_color.cpp [clang-tidy] Convert loops to range based 2019-11-25 14:50:40 -08:00
builtin_set_color.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_source.cpp Use a pager to view long outputs of builtin --help 2019-10-28 18:36:07 +01:00
builtin_source.h split builtin source into its own module 2017-06-16 21:01:56 -07:00
builtin_status.cpp [clang-tidy] Switch from size to empty check 2019-12-26 20:07:53 -08:00
builtin_status.h split builtin status and read into its own module 2017-06-16 21:01:56 -07:00
builtin_string.cpp clang-format .cpp and .h files 2020-01-16 15:18:28 -08:00
builtin_string.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_test.cpp [clang-tidy] Add const to reference 2019-12-26 21:37:15 -08:00
builtin_test.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_ulimit.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
builtin_ulimit.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
builtin_wait.cpp Introduce the internal jobs for functions 2019-12-31 10:08:50 -08:00
builtin_wait.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
cancellable.h Remove some dead code 2020-01-15 11:59:40 -08:00
color.cpp [clang-tidy] Simplify boolean expressions 2019-11-29 23:46:51 -08:00
color.h [clang-tidy] Fix inconsistent declarations 2019-11-25 14:13:33 -08:00
common.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
common.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
complete.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
complete.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
enum_set.h Clean up enum_set.h header 2019-04-26 16:08:19 -07:00
env.cpp [clang-tidy] Add several references 2019-12-26 21:55:53 -08:00
env.h Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
env_dispatch.cpp Place fish in its own process group when launched with -i 2019-12-23 10:32:37 +01:00
env_dispatch.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
env_universal_common.cpp Fix uvar error message 2020-01-13 17:48:09 +01:00
env_universal_common.h [clang-tidy] Add several references 2019-12-26 21:55:53 -08:00
event.cpp Introduce the internal jobs for functions 2019-12-31 10:08:50 -08:00
event.h [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
exec.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
exec.h [clang-tidy] Add several references 2019-12-26 21:55:53 -08:00
expand.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
expand.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
fallback.cpp clang-format .cpp files 2019-11-29 23:57:19 -08:00
fallback.h Amend typos and grammar errors 2019-11-25 13:07:15 +01:00
fish.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
fish_indent.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
fish_key_reader.cpp Place fish in its own process group when launched with -i 2019-12-23 10:32:37 +01:00
fish_test_helper.cpp Correct the usleep calculation in fish_test_helper 2020-01-07 17:07:51 -08:00
fish_tests.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
fish_version.cpp Reformat all files 2019-05-05 12:09:25 +02:00
fish_version.h Revert "Generate FISH_BUILD_VERSION info for cmake builds" 2018-01-08 22:28:10 -08:00
flog.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
flog.h Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
function.cpp Properly print leading comments and indentation in functions 2020-01-03 14:40:28 -08:00
function.h Properly print leading comments and indentation in functions 2020-01-03 14:40:28 -08:00
future_feature_flags.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
future_feature_flags.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
global_safety.h Run clang-format on all files 2019-10-13 15:50:48 -07:00
highlight.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
highlight.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
history.cpp Do not allow empty items to be added to history 2020-01-05 12:47:02 -08:00
history.h Show the first few history entries in set | grep history 2019-12-29 17:43:25 +01:00
history_file.cpp [clang-tidy] Use strcmp family properly 2019-11-29 23:46:51 -08:00
history_file.h Include ctime in history_file.h 2019-10-16 11:55:40 -07:00
input.cpp [clang-tidy] Add several references 2019-12-26 21:55:53 -08:00
input.h [clang-tidy] Add several references 2019-12-26 21:55:53 -08:00
input_common.cpp clang-format .cpp and .h files 2020-01-16 15:18:28 -08:00
input_common.h clang-format .cpp and .h files 2020-01-16 15:18:28 -08:00
intern.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
intern.h restyle intern module to match project style 2016-05-01 20:28:46 -07:00
io.cpp Merge pull request #6447 from neheb/clang2 2019-12-31 18:47:24 +01:00
io.h Collapse io_data switch statements 2019-12-29 15:51:22 -08:00
iothread.cpp Always detach new pthreads 2019-12-16 14:08:46 -08:00
iothread.h Always detach new pthreads 2019-12-16 14:08:46 -08:00
kill.cpp [clang-tidy] Use C++ using instead of C typedef 2019-11-29 23:46:51 -08:00
kill.h fix typos 2019-10-23 19:38:44 +02:00
lru.h lru to use std::map, not std::unordered_map 2019-12-21 17:09:21 -08:00
maybe.h Reformat all files 2019-05-05 12:09:25 +02:00
null_terminated_array.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
null_terminated_array.h Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
operation_context.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
operation_context.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
output.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
output.h [clang-tidy] Fix inconsistent declarations 2019-11-25 14:13:33 -08:00
pager.cpp Use completion_list_t naming everywhere 2020-01-16 15:18:49 -08:00
pager.h Use completion_list_t naming everywhere 2020-01-16 15:18:49 -08:00
parse_constants.h Reject time with background jobs 2020-01-03 01:07:49 -06:00
parse_execution.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
parse_execution.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
parse_grammar.h Make "time" a job prefix 2020-01-03 01:07:49 -06:00
parse_grammar_elements.inc Make "time" a job prefix 2020-01-03 01:07:49 -06:00
parse_productions.cpp Make "time" a job prefix 2020-01-03 01:07:49 -06:00
parse_productions.h style cleanups 2017-05-01 22:05:35 -07:00
parse_tree.cpp Make "time" a job prefix 2020-01-03 01:07:49 -06:00
parse_tree.h Fix error messages for "and" and "or" after pipe 2019-11-26 14:03:53 +01:00
parse_util.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
parse_util.h [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
parser.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
parser.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
parser_keywords.cpp clang-format C++ files 2019-12-29 14:25:42 -08:00
parser_keywords.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
path.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
path.h Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
postfork.cpp Introduce the internal jobs for functions 2019-12-31 10:08:50 -08:00
postfork.h Remove the wait_for_threads_to_die parameter to execute_fork 2019-11-23 12:36:44 -08:00
print_help.cpp Run clang-format on all files 2019-10-13 15:50:48 -07:00
print_help.h restyle proc module to match project style 2016-05-02 22:07:58 -07:00
proc.cpp Be more disciplined about cancellation signals 2020-01-14 15:20:04 -08:00
proc.h Make "time" a job prefix 2020-01-03 01:07:49 -06:00
reader.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
reader.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
redirection.cpp Collapse io_data switch statements 2019-12-29 15:51:22 -08:00
redirection.h dup2_list_t::resolve_chain to stop returning maybe 2019-12-29 14:49:05 -08:00
sanity.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
sanity.h Amend typos and grammar errors 2019-11-25 13:07:15 +01:00
screen.cpp clang-format .cpp and .h files 2020-01-16 15:18:28 -08:00
screen.h Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
signal.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
signal.h Eliminate shell_is_interactive 2019-06-29 11:28:26 -07:00
timer.cpp Make "time" a job prefix 2020-01-03 01:07:49 -06:00
timer.h Make "time" a job prefix 2020-01-03 01:07:49 -06:00
tinyexpr.cpp [clang-tidy] Use C++ using instead of C typedef 2019-11-29 23:46:51 -08:00
tinyexpr.h math: Print special error for logical operators 2019-11-01 08:43:13 +01:00
tnode.cpp Make "time" a job prefix 2020-01-03 01:07:49 -06:00
tnode.h clang-format C++ files 2019-12-29 14:25:42 -08:00
tokenizer.cpp [clang-tidy] Add ending namespace comment 2019-12-26 21:37:17 -08:00
tokenizer.h Introduce redirection_spec_t 2019-12-12 16:44:24 -08:00
topic_monitor.cpp clang-format C++ files 2019-12-29 14:25:42 -08:00
topic_monitor.h Amend typos and grammar errors 2019-11-25 13:07:15 +01:00
trace.cpp Reverse the order of the block stack 2019-12-22 15:07:41 -08:00
trace.h Add support for fish_trace variable to trace execution 2019-11-02 14:40:57 -07:00
utf8.cpp [clang-tidy] Use C++ using instead of C typedef 2019-11-29 23:46:51 -08:00
utf8.h [clang-tidy] Fix inconsistent declarations 2019-11-25 14:13:33 -08:00
util.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
util.h Remove mini() and maxi() 2019-03-12 23:25:15 -07:00
wcstringutil.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
wcstringutil.h Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
wgetopt.cpp [clang-tidy] Replace NULL with nullptr 2019-11-25 14:23:03 -08:00
wgetopt.h rearrange structure fields 2019-04-04 13:47:10 -07:00
wildcard.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
wildcard.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
wutil.cpp [clang-tidy] Remove const from strings 2019-12-26 21:25:12 -08:00
wutil.h [clang-tidy] Remove const from strings 2019-12-26 21:25:12 -08:00