Some terminals can be configured to send variuos escape sequences for keys
that could historically not be detected. Turns out some usage pattern rely
on those quirks.
Shift+Space is easy to mistype when wanting to insert a space (especially
when typing ALL CAPS). Map it to Space, to match user expectations.
Similarly for Control+Return, for which xterm can be configured to send
something other than \cr:
echo 'XTerm.vt100.modifyOtherKeys: 1' | xrdb && xterm
I'm working on a change to builtin bind that allows to bind CSI sequences via
human-readable key names (#3018) but for now let's just map the raw sequences.
Closes#8874
micro only parses the [FILE]:LINE:COL syntax
if the parsecursor option is enabed
in the meanwhile, the +LINE:COL syntax is unambiguous and always valid
You can use an index with vared, like `vared PATH[4]`. However this was
inadverently broken in fa2450db30, because you cannot use `read` to
modify an element of a variable, only the whole variable. Fix this.
Unfortunately this means using another local variable, so we name it
__fish_vared_temp_value instead of just temp so that collisions are
unlikely.
localectl may emit an error for whatever reason. The localectl
completion runs localectl in a command substitution so our stderr
redirect doesn't apply. Just redirect to null. Hopefully this fixes the
tests.
I *think* this is printing
> debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
On Github Actions?
Might need to adjust the test to store the output.
* Print message in set_fish_path -v when a path doesnt exist
* Update changelog
* Remove "; or continue"
* use printf instead of echo, avoid localizing the path
This is a follow-up to #8811, which fixed fish_config on newer versions of
Sailfish OS.
Using the previous method to open the fish_config URL on Sailfish OS worked
only on 4.4 (and 4.3 IIRC), but not on older OS versions. Opening the URL
using xdg-open works well with new and old OS version, and has been tested on
- Sony Xperia 10 II running SFOS 4.4 aarch64
- Sony Xperia XA2 Ultra running SFOS 4.4 armv7hl
- Sony Xperia X running SFOS 4.1 armv7hl
- Jolla Phone running SFOS 3.4 armv7hl
Closes#8872
* feat(completions): add sops completions
* fix: start descriptions with uppercase letter
* fix: shorten descriptions
* fix: use spaces instead of ;
* fix: typo
* feat: better option than __fish_is_first_token
* feat: improve __fish_sops_commands function
* fix: remove useless code
* fix: fix the second argument is not called
As explained in the parent commit, if we print things to the command line,
we move the cursor down before redrawing a multi-line prompt. This is a
workaround to avoid erasing what we printed.
We forgot to do add this workaround to fish_job_summary. When running
`sleep 1 &` with a multiline prompt, the job exit notification is immediately
overwritten (most of the time). This can be observed consistently on Linux
by waiting before redrawing:
diff --git a/share/functions/fish_job_summary.fish b/share/functions/fish_job_summary.fish
index a552fabbc..f457ee8e8 100644
--- a/share/functions/fish_job_summary.fish
+++ b/share/functions/fish_job_summary.fish
@@ -52,6 +52,7 @@ function fish_job_summary -a job_id is_foreground cmd_line signal_or_end_name si
string repeat \n --count=(math (count (fish_prompt)) - 1) >&2
if test $is_foreground -eq 0; and test $signal_or_end_name != STOPPED
+ sleep 1
commandline -f repaint
end
end
Move the cursor down to work around this. In future, we could avoid calling
fish_prompt. Also, this solution add an extra blank lines before the next
prompt. With a real fix, we could get rid of that. Even worse, sometimes
there are two blank lines instead of one (for a two-line prompt).
Fixes#8817
We have some key bindings that print directly to the terminal while the user
is still typing the command line. Thereafter, we redraw the command line,
so the user can resume typing. To redraw a multiline command line, we first
erase several lines above the cursor. To not erase the key bindings' output,
we move the cursor down that many lines.
Simplify the logic; no functional change.
This conditionally set a function variable in an unsafe way.
If you do something like
```fish
if condition
set -f foo bar
end
```
then, if the condition was false, $foo could still use a global variable.
In this case, alias would now fail if a variable $wraps was defined globally.
This reverts most of commit 14458682d9.
The message rewording can stay, it's *fine* (tho it'll break the
translations but then we'd need a real string freeze with a
translation team for those to be worth anything anyway, soo)
* completions/lxc: parse container names with numbers and other commands
* Revert CHANGELOG.rst
* Code Review: use multiple subcommands ability of __fish_seen_subcommand_from
git.fish loads git-foo.fish completions.
As reported in #8831, this can be slow when the user has run something like
complete git-foo -w 'git diff'
because git.fish runs 'complete -C "git-autofixup "' at load time.
Commit 09161761c (Complete custom "git-foo" commands from "git foo",
2021-01-24) did that to avoid adding filename completions for "git foo".
Drop that check.
This means that users who don't want filename completion for "git foo",
need to define at least one custom completion for "git-foo", like
complete git-foo -f
This was already apparently supposed to work, but didn't because we
just overrode errno again.
This now means that, if a correctly named candidate exists, we don't
start the command-not-found handler.
See #8804
-d has been removed in FreeBSD 13 & monterey
-t has also been removed from date(1)
-n has been "Obsolete flag, accepted and ignored for compatibility",
for a while, leave it out.
-R added for RFC 2822
-I added for ISO 8601
Some description changes
The tmp and prompt variables collide with variables used as arguments.
Just avoid them entirely, at the cost of making the internals of the
functions somewhat more complicated.
Closes#8836.
Otherwise this was 100% monospace.
But since we have a specific list of fonts that we have checked, let's
use the same list instead of just adding "Helvetica" again.