fish-shell/src
Johannes Altmanninger c3cd68dda5 Process shell commands from bindings like regular char events
A long standing issue is that bindings cannot mix special input functions
and shell commands. For example,

    bind x end-of-line "commandline -i x"

silently does nothing. Instead we have to do lift everything to shell commands

    bind x "commandline -f end-of-line; commandline -i x"

for no good reason.

Additionally, there is a weird ordering difference between special input
functions and shell commands. Special input functions are pushed into the
the queue whereas shell commands are executed immediately.

This weird ordering means that the above "bind x" still doesn't work as
expected, because "commandline -i" is processed before "end-of-line".

Finally, this is all implemented via weird hack to allow recursive use of
a mutable reference to the reader state.

Fix all of this by processing shell commands the same as both special input
functions and regular chars. Hopefully this doesn't break anything.

Fixes #8186
Fixes #10360
Closes #9398
2024-03-23 10:06:11 +01:00
..
bin Suppress unknown_lints lint 2024-03-09 13:49:25 +01:00
builtins Process shell commands from bindings like regular char events 2024-03-23 10:06:11 +01:00
env Address clippy lints 2024-03-09 13:49:25 +01:00
fork_exec Remove using statements already imported by preludes 2024-02-28 09:41:51 -06:00
history Use File instead of OwnedFd in a few places (#10355) 2024-03-17 11:20:44 -05:00
tests Process shell commands from bindings like regular char events 2024-03-23 10:06:11 +01:00
universal_notifier Move from libc read/write to nix read/write 2024-01-21 11:49:40 -08:00
widecharwidth Move fish-rust to project root 2024-01-13 03:58:33 +01:00
wutil Switch more to File/BorrowedFd from OwnedFd/RawFd 2024-03-23 00:01:57 -05:00
abbrs.rs abbr: Box the regex 2024-02-28 18:48:24 +01:00
ast.rs ast: Replace can_parse with static dispatch 2024-03-16 08:39:27 +01:00
autoload.rs Change wopen_cloexec() to return File 2024-03-23 01:34:23 -05:00
color.rs Fix some clippy warnings 2024-01-21 19:12:33 -08:00
common.rs Add native read_retry() and write_retry() methods 2024-03-22 23:05:56 -05:00
complete.rs History pager to only operate on the line at cursor 2024-03-23 09:54:18 +01:00
curses.rs remove repetitive words (#10348) 2024-03-07 18:35:41 -06:00
editable_line.rs History pager to only operate on the line at cursor 2024-03-23 09:54:18 +01:00
env_dispatch.rs Remove unnecessary scoped #[allow] attributes 2024-03-09 13:49:25 +01:00
env_universal_common.rs Change wopen_cloexec() to return File 2024-03-23 01:34:23 -05:00
event.rs Remove L! from sprintf calls 2024-01-13 08:52:54 +01:00
exec.rs Change wopen_cloexec() to return File 2024-03-23 01:34:23 -05:00
expand.rs Add feature flag to turn off %self (#10262) 2024-02-06 22:13:16 +01:00
fallback.rs Use File instead of OwnedFd in a few places (#10355) 2024-03-17 11:20:44 -05:00
fd_monitor.rs Remove using statements already imported by preludes 2024-02-28 09:41:51 -06:00
fd_readable_set.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
fds.rs Change wopen_cloexec() to return File 2024-03-23 01:34:23 -05:00
fish_test_helper.cpp test_helper: Give self-signalling a chance to trigger 2024-03-19 16:41:25 +01:00
flog.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
function.rs Remove using statements already imported by preludes 2024-02-28 09:41:51 -06:00
future_feature_flags.rs Address clippy lints 2024-03-09 13:49:25 +01:00
future.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
global_safety.rs Simplify shared-from-this pattern 2024-03-09 10:09:03 +01:00
highlight.rs Address clippy lints 2024-03-09 13:49:25 +01:00
history.rs Change wopen_cloexec() to return File 2024-03-23 01:34:23 -05:00
input_common.rs Process shell commands from bindings like regular char events 2024-03-23 10:06:11 +01:00
input.rs Process shell commands from bindings like regular char events 2024-03-23 10:06:11 +01:00
io.rs Change wopen_cloexec() to return File 2024-03-23 01:34:23 -05:00
job_group.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
kill.rs Remove L! from sprintf calls 2024-01-13 08:52:54 +01:00
lib.rs Suppress unknown_lints lint 2024-03-09 13:49:25 +01:00
libc.c Switch to the terminfo crate 2024-02-22 20:10:16 +01:00
libc.rs Remove uses of LC_GLOBAL_LOCALE 2024-02-01 22:15:24 +01:00
locale.rs Remove uses of LC_GLOBAL_LOCALE 2024-02-01 22:15:24 +01:00
nix.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
null_terminated_array.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
operation_context.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
output.rs Change MainThread<T> abstraction 2024-03-01 19:42:43 -06:00
pager.rs History pager to only operate on the line at cursor 2024-03-23 09:54:18 +01:00
parse_constants.rs Remove L! from sprintf calls 2024-01-13 08:52:54 +01:00
parse_execution.rs Forbid subcommand keywords in variables-as-commands (#10249) 2024-02-06 22:12:55 +01:00
parse_tree.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
parse_util.rs Disallow background operator before && or || 2024-01-20 11:32:44 +01:00
parser_keywords.rs Remove widestring-suffix uses 2024-01-13 08:52:54 +01:00
parser.rs Add and use separate open_dir() method 2024-03-23 01:15:43 -05:00
path.rs Fix build on NetBSD (#10270) 2024-01-28 21:45:14 +01:00
pointer.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
print_help.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
proc.rs clippy 2024-01-13 08:52:54 +01:00
re.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
reader_history_search.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
reader.rs Process shell commands from bindings like regular char events 2024-03-23 10:06:11 +01:00
redirection.rs Use nix OFlag for open_cloexec 2024-01-27 20:42:13 +01:00
screen.rs Change MainThread<T> abstraction 2024-03-01 19:42:43 -06:00
signal.rs Use cfg directly instead of going through features 2024-01-13 15:16:47 -06:00
termsize.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
threads.rs Address clippy lints 2024-03-09 13:49:25 +01:00
timer.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
tinyexpr.rs Remove widestring-suffix uses 2024-01-13 08:52:54 +01:00
tokenizer.rs Add # as a path component char 2024-01-28 10:41:15 +01:00
topic_monitor.rs Use OwnedFd in AutoClosePipes 2024-02-11 11:40:27 -08:00
trace.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
util.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
wait_handle.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
wchar_ext.rs Disallow background operator before && or || 2024-01-20 11:32:44 +01:00
wchar.rs Remove widestring-suffix uses 2024-01-13 08:52:54 +01:00
wcstringutil.rs remove repetitive words (#10348) 2024-03-07 18:35:41 -06:00
wgetopt.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
wildcard.rs remove repetitive words (#10348) 2024-03-07 18:35:41 -06:00