Commit Graph

16105 Commits

Author SHA1 Message Date
Fabian Boehm
a7af4a0307 Replace some uses of tr 2022-07-22 12:21:03 +02:00
Fabian Boehm
a6820cbe62 trap: Remove superfluous helper functions and stringify 2022-07-22 12:21:03 +02:00
David Adam
4bad88f0df update Vi key binding documentation to reflect reality
PR #6777 changed all the keys to uppercase, but many Vi commands are case
sensitive.

PR #7908 changed the "u" binding but the documentation still had the old
meaning.
2022-07-21 22:57:37 +08:00
Fabian Boehm
afe7e2d27f completions/rc-status: Fix missing "-d" 2022-07-20 21:28:57 +02:00
David Adam
e93e85f3ce Merge branch 'Integration_3.5.1' 2022-07-20 22:25:41 +08:00
David Adam
62063e24ca Release 3.5.1 2022-07-20 18:15:43 +08:00
Fabian Boehm
1f0902a5f5 default prompt: Use same status color as default theme
This was weird, because it changed around just because you picked a
separate theme (that didn't have a status color).

Simply use the same color here.
2022-07-19 17:05:48 +02:00
Fabian Boehm
2dc1150e35 themes: Add missing colors from the default theme
These are used in prompts only, and it feels weird not to have them.

In practice, fish_color_host_remote would not be used at all (just
because you switched from the default theme!), while fish_color_status
would fall back on a different value.

That'll be adjusted in the next commit.
2022-07-19 17:03:00 +02:00
Fabian Boehm
ebd6b2cbd7 Sync default themes again
This takes the values from the .theme file.

In future we might think about re-using that, but for now it's too new
and seems brittle to depend on it.
2022-07-19 16:56:16 +02:00
Fabian Boehm
547a4b2baf docs: Link some more to $PATH 2022-07-18 20:53:37 +02:00
Fabian Boehm
603a8e31e3 docs: Link fish_greeting function from FAQ
And explain the variable more in fish_greeting.

Closes #9056
2022-07-18 20:52:16 +02:00
Fabian Boehm
0709b796bb CHANGELOG path mtime 2022-07-18 20:47:39 +02:00
Fabian Boehm
407a455cfd realpath: Use physical PWD
This was an inadvertent change from
cc632d6ae9.

Because we used wgetcwd directly before, we always got the "physical"
resolved $PWD.

There's an argument to be made to use the logical $PWD here as well
but I prefer not to make changes lik that in a random commit without
good reason.
2022-07-18 20:45:30 +02:00
Fabian Boehm
5dfb64b547
Add path mtime (#9057)
This can be used to print the modification time, like `stat` with some
options.

The reason is that `stat` has caused us a number of portability
headaches:

1. It's not available everywhere by default
2. The versions are quite different

For instance, with GNU stat it's `stat -c '%Y'`, with macOS it's `stat
-f %m`.

So now checking a cache file can be done just with builtins.
2022-07-18 20:39:01 +02:00
Wilke Schwiedop
d9ee5d3863 fix trailing comments in __fish_print_hostnames
/etc/hosts specifies, that everything after a #-character is to be
treated as a comment. The current __fish_print_hostnames however only
considers #-characters at the beginning of a line.
Thus the comment from following valid hosts-entry would end up in the
completion output:

1.2.3.4  myhost # examplecomment

getent hosts properly handles comments.
2022-07-17 17:39:58 -05:00
Aaron Gyes
e2fda67439 Adjust fish_color_search_match
Make the default more likely to be perceptible.
2022-07-17 15:20:41 -07:00
Aaron Gyes
763240f1af Just remove the dumb comment. 2022-07-17 14:41:35 -07:00
Aaron Gyes
c312d2281b
fixup 2022-07-17 14:38:35 -07:00
Aaron Gyes
198ce73db5
Update CHANGELOG for test extensions 2022-07-17 14:18:18 -07:00
ridiculousfish
fa3ca60111 Add a tmux-sleep to tmux-history-search
This test was failing often on my local Mac; this sleep seems to make it
reliable again.
2022-07-16 17:46:12 -07:00
Aaron Gyes
77f6afa501 Add testcases for [ extensions
Some sanity checks for -ot, -nt, -ef

Try negative mtime values too, there was interesting behavior
there during development.
2022-07-16 12:40:36 -07:00
Aaron Gyes
92eb6024ed Document the three new [ operators
Explain test(1)'s -ef, -nt, -ot features.
2022-07-16 12:40:36 -07:00
Aaron Gyes
a6ed9ace6a Add -ot, -nt, -ef to test completions
also complete filenames in binary cases

e.g. test path -ef path
2022-07-16 12:40:36 -07:00
Aaron Gyes
8f91ee7f6b builtin test: Implement -ot, -nt, -ef
These are non-POSIX extensions other test(1) utilities implement,
which compares the modification time of two files as proposed for
fish in #3589: testing if one file is newer than another file.

-ef is a common extension to test(1) which checks if two paths refer
to the same file, by comparing the dev and inode numbers.
2022-07-16 12:40:36 -07:00
Johannes Altmanninger
7bdc712615 Clean up weird edge-case for escaping unescaped brackets
As explained by the comment, this was dead code.  If it were ever executed,
it would cause very weird behavior because it would make some completions
randomly affect others.

Let's just print a warning (maybe this is better than crashing?).
2022-07-16 16:42:34 +02:00
Johannes Altmanninger
12cf31de96 Remove a redundant comment
Also add an issue reference since the commit message doesn't have one.
Of course a test would be even better.
2022-07-16 16:42:19 +02:00
Moheeb Aljaroudi
d4d0ac95b0 Fixed problem where fish would escape '~' when completing an unescaped
']'
2022-07-16 16:17:51 +02:00
David Adam
0f84b9fafb CHANGELOG: work on 3.5.1 2022-07-16 21:55:28 +08:00
Bagohart
e7e4d8415b added tab completions for choose
(cherry picked from commit ce6b122f7f)
2022-07-16 21:41:37 +08:00
Bagohart
9cdaf1ec72 added tab completions for navi
(cherry picked from commit 824ee5d70b)
2022-07-16 21:40:30 +08:00
Bagohart
ce6b122f7f added tab completions for choose 2022-07-16 21:40:02 +08:00
Bagohart
824ee5d70b added tab completions for navi 2022-07-16 21:36:12 +08:00
David Adam
e8cc3803ca CHANGELOG: work on 3.5.1 2022-07-14 22:25:42 +08:00
Israel Chauca Fuentes
a4f5b9eb54 Add completion for the "expect" command
(cherry picked from commit 9e43e74723)
2022-07-14 13:26:08 +08:00
Alexander M
c5240033df Fix long descriptions in gdb.fish
Work on #6981

(cherry picked from commit 8d57bc6a9a)
2022-07-14 13:26:01 +08:00
Fabian Boehm
303bf2cfcb completions/git: Use __fish_git
That's the one that silences stderr!

(cherry picked from commit 8082f8c056)
2022-07-14 13:25:51 +08:00
Kid
d3f4b829ba file completion nuances on macOS
(cherry picked from commit e6505d1c30)
2022-07-14 13:25:41 +08:00
Fabian Boehm
4c2ce4b931 Add error for EBADARCH
That's apparently errno 86 on macOS, and it's triggered when the
architecture is wrong.

I'll leave other macOS errors to the macOS users.

See #9052.

(cherry picked from commit 60f87ef3be)
2022-07-14 13:25:32 +08:00
Fabian Boehm
98838ac429 Fix special readline functions after and/or
Here we needed to handle self-insert immediately, but we ended up
returning it.

Fixes #9051

(cherry picked from commit d920610f96)
2022-07-14 12:43:12 +08:00
David Adam
62cc498e1c CHANGELOG: remove entries moved to 3.5.1 2022-07-13 23:14:25 +08:00
Fabian Boehm
e67b6c1f00 history: Refuse to merge in private mode
It makes *no* sense.

Fixes #9050.

(cherry picked from commit bd7934ccbf)
2022-07-13 23:13:33 +08:00
Fabian Boehm
1008b729a7 fish_job_summary: Format message better for multiline prompts
This was supposed to be number of lines in the prompt minus 1, but
string repeat added one.

Also it triggered even in case of the stopped job message, which is
already repainted differently.

So we add it when we need to repaint ourselves.

As a bonus add a newline before in that case so the message isn't
awkwardly printed into the commandline.

Fixes #9044.

(cherry picked from commit 80fe0a7fcb)
2022-07-13 23:12:02 +08:00
Rocka
bc30e15774 completions: add qdbus completion
(cherry picked from commit c588bd5c5c)
2022-07-13 23:10:31 +08:00
SeekingBlues
173914af65
Highlight history searches correctly (#9066)
Previously, the search text is used to find out which part of the
updated command line should be highlighted during a history search. This
approach will cause the incorrect part to be highlighted when the line
contains multiple instances of the search text.

To address this, we have to find out exactly where to highlight, i.e.
the offset of the current token in the command line (0 if not a token
search) plus the offset of the search text in the match.
2022-07-13 16:48:04 +02:00
NextAlone
1c3a8e0e11 feat: completion for reflector (#9027)
(cherry picked from commit 5642499dc2)
2022-07-13 22:21:39 +08:00
mhmdanas
970f32d87f Prioritize APKs for adb install
(cherry picked from commit 9f19ab1fba)
2022-07-13 22:20:31 +08:00
exploide
95582ef76b scp completions: added new options
(cherry picked from commit 459bbe208d)
2022-07-13 22:20:17 +08:00
Fabian Boehm
89a30841f2 printf: Print special error for invalid octal numbers
(tbh these were always a mistake)

See #9035

(cherry picked from commit 13a9f6b64e)
2022-07-13 22:18:59 +08:00
ridiculousfish
9397ede963 Clear signals after running initial commands
If you run an initial command via `fish -c`, and that command is
cancelled e.g. via control-C, then ensure that the cancellation signal
is cleared before running config files.

Fixes #9024

(cherry picked from commit 137a4ecdf5)
2022-07-13 22:18:43 +08:00
Fabian Boehm
6e9590b220 Activate fish_vi_cursor for tmux
Discussions with the tmux maintainer show that:

1. We no longer need the passthrough sequence at all (and it's
deactivated by default)
2. Tmux can check if the outer terminal supports cursor shaping

Fixes #8981

(cherry picked from commit b4a3b9982c)
2022-07-13 22:18:12 +08:00