Commit Graph

19450 Commits

Author SHA1 Message Date
Peter Ammon
91ffa8ab48
Revert "Resume repainting command line when colors change"
This reverts commit 313bd558da.

Per discussion in 313bd558da
2024-08-25 18:41:31 -07:00
EmilyGraceSeville7cf
0954ec2596
feat: add yajsv completion 2024-08-24 16:30:52 -07:00
Dezhi Wu
04a4e5c4e7 Add completions for jj
Jujutsu (jj) is a powerful version control system for software projects.

More information can be found at https://github.com/martinvonz/jj
2024-08-24 15:26:18 -07:00
Peter Ammon
313bd558da
Resume repainting command line when colors change
This restores a hack to trigger a command line repaint when "$fish_color_*" or
"$fish_pager_color_*" changes. These allow the command line to react immediately
to changes in other sessions or web_config.

This was removed in ff62d172e5 but there does not
appear to be a handler which actually redraws these.

Revert of ff62d172e5
2024-08-24 15:02:14 -07:00
Johannes Altmanninger
5918bca1eb Make "complete -e" prevent completion autoloading
We do the same for functions.

Closes #6716
2024-08-24 08:30:52 +02:00
Mahmoud Al-Qudsi
f3d59abc46 Remove unnecessary reference 2024-08-20 14:48:59 -05:00
Mahmoud Al-Qudsi
6c37103b7c unescape_yaml_fish_2_0: Remove MaybeUninit::assume_init()
The generated assembly is more or less the same and the previously generated
version had been manually verified, but this PR removes the usage of
`MaybeUninit::assume_init()` and replaces it with direct pointer writes.

This should result in no observable change: it continues to pass the functional
tests and benchmarks identically. The safety of the new code has been verified
with Miri.

[0]: https://github.com/mqudsi/fish-yaml-unescape-benchmark
2024-08-20 14:27:59 -05:00
Fabian Boehm
569d3cdfff completions/git: Add rev-list
The basics, by eye-balling the options that are the same as log.

Also fixes a typo: ingnore-missing
2024-08-20 20:55:16 +02:00
Fabian Boehm
c9bc04f274 fish_config: Write an empty prompt if necessary
This clears the right prompt if the new preset doesn't have any.

This was supposed to be fixed but was broken again in
f3b950157d.

Fixes #10675.
2024-08-19 17:03:52 +02:00
triallax
ad674c61dc Improve apk completions for apk 3.x
- -q silenced warnings in apk 2.x but not in in 3.x, so redirect stderr
  to /dev/null to avoid seeing warnings while completing (-q is still
  passed to `apk search` as it strips package versions and releases)
- Drop `-q` from `apk info`, as on apk 3.x it prevents apk info from
  outputting anything at all

I've tested these changes on both Chimera Linux (which uses apk 3.x)
and Alpine Linux (which is still using 2.x).
2024-08-18 12:28:36 +02:00
EmilyGraceSeville7cf
7883de6562 feat: add web-ext completion 2024-08-18 12:28:03 +02:00
Fabian Boehm
a23cfd0aa8 Simplify freedesktop icon completions
Use `path` more and skip the `sort` - this is for completions and
they're sorted internally.
2024-08-18 12:22:39 +02:00
kpbaks
f07e6c6667 Add completions for notify-send 2024-08-18 12:18:26 +02:00
Johannes Altmanninger
31896534a0 Correct iTerm2 version in CSI u workaround
The 3.5.4 release does not include the fix, presumably the next one then.

See #10653
2024-08-17 07:43:18 +02:00
Fabian Boehm
8612d34996 Remove useless osttr->cstr->osstr roundtrip 2024-08-16 15:30:57 +02:00
Fabian Boehm
980ef6f2f1 Extend small stack workaround to netbsd 2024-08-15 18:32:25 +02:00
Fabian Boehm
835f907cd4 docs: Remove broken indents in license
Lots of "WARNING: Block quote ends without a blank line; unexpected
unindent." from sphinx.
2024-08-15 17:48:48 +02:00
Fabian Boehm
a4cc9c6975 Skip cd-without-read tests on NetBSD 2024-08-15 17:38:04 +02:00
Fabian Boehm
2965603e7f Work around eventfd on NetBSD
Revisit if libc gains support
2024-08-15 17:38:02 +02:00
Johannes Altmanninger
e4bcee2727 Revert "Decode arrow keys as sent by urxvt"
This does not work as-is ("CSI a" is shift-up, not up).
I'm not sure if we want to implement these.
It's not a regression so there is no pressure.

This reverts commit 350598cb99.
2024-08-14 15:43:54 +02:00
Johannes Altmanninger
fcf7cd81cf Parse no more than one \e prefix as alt modifier 2024-08-14 15:16:14 +02:00
Johannes Altmanninger
53ea6db72d Show un-decodable inputs as bytes instead of the internal encoding
When the input is invalid UTF8, we re-encode the raw bytes using the private
use area. Let's make sure we convert back before printing.
2024-08-14 15:16:14 +02:00
Johannes Altmanninger
182f8948b8 Remove unused function 2024-08-14 15:16:14 +02:00
Johannes Altmanninger
b8e280add6 Clean up fish_key_reader rendering code 2024-08-14 15:16:14 +02:00
Fabian Boehm
da8fe7e845 docs: Point to functions/type from funced/funcsave
Fixes #10609
2024-08-13 17:44:23 +02:00
Fabian Boehm
357eb3cd32 fish_key_reader: use char_to_symbol for verbose output
byte_to_symbol was broken because it didn't iterate by byte, it
iterated by rust-char, which is a codepoint.

So it failed for everything outside of ascii and, because of a
mistaken bound, ascii chars from 0x21 to 0x2F ("!" to "/" - all the punctuation).

char_to_symbol will print printable codepoints as-is and
others escaped. This is okay - something like `decoded from: +` or
`decoded from: ö` is entirely understandable, there is no need to tell
you that "ö" is \xc3\xb6.

This reverts commit 423e5f6c03.
2024-08-13 16:03:47 +02:00
Fabian Boehm
7fc58ee7f5 help: Show online URL in case showing it locally doesn't work.
See #10668.
2024-08-13 15:46:22 +02:00
Fabian Boehm
0520b56ea9 webconfig: Don't allow exceptions from chromeos workaround
This except clause was too narrow, so it would fail here even on other
systems just because webbrowser.get() returned nothing usable

Now it will fail *later* with "could not locate runnable browser", but
at least it won't say anything about chromeos on non-chromeos systems.
2024-08-13 15:41:44 +02:00
Johannes Altmanninger
423e5f6c03 Fix fish_key_reader --verbose output 2024-08-11 15:16:03 +02:00
Fabian Boehm
e3196446fa Fix crash in ctrl_to_symbol
Array starts at 0, goes up to 27, that's 28 entries... *BUT* we also
need the catch-all entry after, so it's 29.

To be honest there's got to be a better way to write this.
2024-08-11 14:57:04 +02:00
Fabian Boehm
9903eb4c76 Convert ASCII DEL to \x7f
Annoying when you press backspace in fish_key_reader
2024-08-11 14:57:04 +02:00
Fabian Boehm
1f7fdd5d88 Add back docs for fish_key_reader --verbose 2024-08-11 14:57:04 +02:00
hdhoang
7682abb703 Import portable_atomic::AtomicU64 when std does not provide it
Restores support for 32-bit powerpc and mips. Fixes #10415.

Signed-off-by: Hoang Duc Hieu <code@hdhoang.space>
2024-08-11 14:50:39 +02:00
Johannes Altmanninger
ebd23c9f86 Add back fish_key_reader --verbose
See #10663
2024-08-11 14:41:17 +02:00
Johannes Altmanninger
ba3683cfa5 Disable keyboard protocols on WezTerm
WezTerm supports CSI u but unfortunately, typing single quote on a German
keyboard makes WezTerm send what gets decoded as `shift-'`.

This is bad, so disable it until this is fixed.  In future we should maybe
add a runtime option to allow the user to override this decision.

See #10663
2024-08-11 14:12:28 +02:00
Munzir Taha
58cf600747 Create run0.fish
Initial run0 completion which could later be improved.
2024-08-11 11:45:21 +02:00
Colin Woodbury
7f7a9a3e09 Update aura completions 2024-08-11 11:44:57 +02:00
Klaus Hipp
c958ee08a3 Update zed completions 2024-08-11 11:44:07 +02:00
Zapeth
9dd0b60509 Update xbps-install.fish
`-R` or `--repository` require an argument which is in most cases a url, but can also refer to a directory path on the file system
2024-08-11 11:43:29 +02:00
metamuffin
5648c86a08 wg completion 2024-08-11 11:42:45 +02:00
Lzu Tao
a1a293032a Complete commands after timeout 2024-08-11 11:41:17 +02:00
Lzu Tao
ca485768cb Complete gem install --user-install 2024-08-11 11:41:17 +02:00
Johannes Altmanninger
ff476eff2d Read \e prefix for escape sequences as alt modifier
The \e\e\[A style is bad but iTerm and putty (alt-left) use it.

The main motivation for this change is to improve fish_key_reader output.

Part of #10663
2024-08-11 11:31:13 +02:00
Johannes Altmanninger
d32825ba57 Decode formatOtherKeys=0 format (XTerm default) too
Part of #10663
2024-08-11 11:31:13 +02:00
Peter Ammon
2b40c6364e
Mark some functions as potentially unused
Fixes warnings on macOS
2024-08-10 17:36:56 -07:00
Johannes Altmanninger
4664a0b52f Limit iTerm2 CSI u workaround to iTerm<=3.5.3
Looks like 3.5.4 will include
9cd0241afd
so the need for the workaround is gone.

See #10653
2024-08-10 08:17:35 +02:00
Dezhi Wu
09b8b94025 Remove unnecessary unsafe block
The `unsafe` is not needed here, as the `select64` is already a safe wrapper
around the `C_select64` function.

Closes #10659
2024-08-10 07:16:04 +02:00
Johannes Altmanninger
09797acf92 make_vendor_tarball: fix deprecated name for vendor Cargo manifest
> /builddir/build/BUILD/fish-3.7.1+2217.gbd5f9babd-build/fish-3.7.1-2217-gbd5f9babd/.cargo/config
> is deprecated in favor of config.toml
2024-08-09 15:07:42 +02:00
Fabian Boehm
bd5f9babd7 __fish_seen_subcommand_from: Fix error when there's no second token
Regression from 2bfa7db7bc

Can be triggered e.g. with `complete -C"history "`.
2024-08-08 21:20:07 +02:00
Johannes Altmanninger
5f9e9cbe74 Replace clock_gettime/futimens with 64-bit wrappers
Part of #10634
2024-08-07 13:11:22 +02:00