| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
This enables readline functions to appear after the self-insert
when defining bindings. This is preparation for fixing #1595.
|
|
|
|
|
|
|
|
|
|
| |
- Add four new functions: forward-bigword, backward-bigword,
kill-bigword, backward-kill-bigword
- Add new enum move_word_style_whitespace and related state machine
method
- Change vi key bindings to operate on bigwords: B, gE, W, E, dW, diW,
daW, dE, dB, dgE, cW, ciW, caW, cE, cB, cgE, yW, yiW, yaW, yE, yB,
ygE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the case
```
bind \et "commandline -i 1" "commandline -i 2"
```
the order of execution of the commands is now in-order.
Note that functions codes are prepended to the queue in reverse order, so they
will be executed in-order. This should allow all bindings of the form
```
bind \et beginning-of-line force-repaint
```
to remain unchanged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using builtin `commandline -f`, one would expect to have commands executed in
the order that they were given. This motivates the change to a queue.
Unfortunately, fish internals still need lookahead_list to act as a stack. Add
and rename functions to support both cases and have lookahead_list as
a std::deque internally.
This code is delicate, and we should probably dog-food this in nightly for
a while before the next-minor release.
Fixes #1567
|
|
|
|
| |
(added in 9ec808a4c)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD PR was https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=108117
OpenBSD PR was 5447.
Both have been fixed for years.
This reverts commit c55cbd3f2f003ea6e36727f8b985e880d6aded85, among
others.
|
| |
|
| |
|
|
|
|
| |
This avoids the potential for leaking the resulting string.
|
|
|
|
| |
std::vector::erase() didn't take const_iterator until C++11 >_<
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Binds with the same sequence in multiple modes was not working right.
Fix up the implementation to propagate modes everywhere as necessary.
This means that `bind` will properly list distinct binds with the same
sequence, and `bind -e` will take mode into account properly as well.
Note that `bind -e seq` now assumes the bind is in the default bind
mode, whereas before it would erase the first binding with that sequence
regardless of mode.
`bind -e -a` still erases all binds in all modes, though `bind -M mode
-e -a` still only erases all binds in the selected mode.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a key is bound to a fish function, if that function invokes
`commandline`, it gets a stale copy of the commandline. This is because
any keys passed to `self-insert` (the default) don't actually get added
to the commandline until a special character is processed, such as the
R_NULL that gets returned after running a binding for a fish command.
To fix this, don't allow fish commands to be run for bindings if we're
processing more than one key. When a key wants to invoke a fish command,
instead we push the invocation sequence back onto the input, followed by
an R_NULL, and return. This causes the input loop to break out and
update the commandline. When it starts up again, it will re-process the
keys and invoke the fish command.
This is primarily an issue with pasting text that includes bound keys in
it. Typed text is slow enough that fish will update the commandline
between each character.
---
I don't know of any way to write a test for this, but the issue can be
reproduced as follows:
> bind _ 'commandline -i _'
This binds _ to a command that inserts _. Typing the following works:
> echo wat_is_it
But if you copy that line and paste it instead of typing it, the end
result looks like
> _echo wat_isit
With this fix in place, the pasted output correctly matches the typed
output.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
errors
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
builtin.cpp
builtin_commandline.cpp
highlight.cpp
input.cpp
input.h
reader.cpp
screen.cpp
screen.h
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 74135c0600d5dcc40d396d0e7293c17b8d4bdaa7, reversing
changes made to 6d749789ce240a3e6f1447777db63fd8e7525560.
See discussion in #1317
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
is specified before Y, then Y will never be invoked because X will
always get there first. Now instead we order bindings in descending
order by length, so that we always test the binding before any others that
prefixes it. Fixes #1283.
|
| | |
|
| |
| |
| |
| | |
complete-and-search.
|
| |
| |
| |
| |
| |
| | |
'and' will prevent later input functions from being executed if the
previous one did not succeed (e.g. a jump to a char not on the command
line)
|
| |
| |
| |
| | |
Input functions can now have arguments
|
| | |
|
| | |
|
| |
| |
| |
| | |
when sourcing fish_vi_mode.fish
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
implement force repaint and multi-char bindings;
|
|/ |
|
|
|
|
| |
https://github.com/fish-shell/fish-shell/issues/1142
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes: https://github.com/fish-shell/fish-shell/issues/1060
'ansi' should always be present (tested on Solaris, Linux, FreeBSD,
Darwin).
Also overrides TERM so that other programs behave consistently e.g.
fish_pager.
The error message makes no specific mention of terminfo or termcap as
these vary across operating systems.
(r+ @ridiculousfish with thanks)
|
|
|
|
| |
Ref: #1060
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|