Commit Graph

19584 Commits

Author SHA1 Message Date
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
Johannes Altmanninger
c1fba4663b Replace nanosleep with stdlib wrapper (which is still broken)
As of rust 1.78, the Unix stdlib implementation is affected by the same issue:

    pub fn sleep(dur: Duration) {
        let mut secs = dur.as_secs();
        let mut nsecs = dur.subsec_nanos() as _;

        // If we're awoken with a signal then the return value will be -1 and
        // nanosleep will fill in `ts` with the remaining time.
        unsafe {
            while secs > 0 || nsecs > 0 {
                let mut ts = libc::timespec {
                    tv_sec: cmp::min(libc::time_t::MAX as u64, secs) as libc::time_t,
                    tv_nsec: nsecs,
                };
                secs -= ts.tv_sec as u64;
                let ts_ptr = core::ptr::addr_of_mut!(ts);
                if libc::nanosleep(ts_ptr, ts_ptr) == -1 {
                    assert_eq!(os::errno(), libc::EINTR);
                    secs += ts.tv_sec as u64;
                    nsecs = ts.tv_nsec;
                } else {
                    nsecs = 0;
                }
            }
        }
    }

Note that there is a small behavior change here -- sleep() will continue
after signals; I'm not sure if we want that but it seems harmless?

Part of #10634
2024-08-07 13:11:22 +02:00
Johannes Altmanninger
55196ee2a0 Replace pselect with a 64-bit-time_t wrapper
Part of #10634
2024-08-07 13:11:22 +02:00
Johannes Altmanninger
4992f88966 Replace getrusage with a 64-bit-time_t wrapper
Part of #10634
2024-08-07 13:11:22 +02:00
Johannes Altmanninger
46c8ba2c9f Replace select with a 64-bit-time_t wrapper
Part of #10634
2024-08-07 13:11:22 +02:00
Johannes Altmanninger
3a9b4149da Replace localtime_r with a 64-bit-time_t wrapper
Part of #10634
2024-08-07 13:11:22 +02:00
Johannes Altmanninger
70357c4f6e Add back .clang-format 2024-08-07 13:11:22 +02:00
Johannes Altmanninger
338579b78c Rename fstatat/readdir wrapper to match Linux equivalents 2024-08-07 13:11:22 +02:00
Johannes Altmanninger
d19e5508d7 Remove non-portable use of fstatat
Part of #10634
2024-08-06 14:16:01 +02:00
Johannes Altmanninger
0705446e6e Remove non-portable use of stat
Part of #10634
2024-08-06 14:16:01 +02:00
Johannes Altmanninger
ff47c2c628 Remove non-portable use of fstat
Part of #10634
2024-08-06 14:15:57 +02:00
Johannes Altmanninger
b64045dc18 Remove non-portable use of ino_t
Part of #10634
2024-08-06 14:15:03 +02:00
Johannes Altmanninger
fa4daeee0f Address clippy lint 2024-08-06 14:15:03 +02:00
Johannes Altmanninger
8fbe29ed7b Remove dead code 2024-08-06 14:15:03 +02:00
Johannes Altmanninger
7cfc6297bc Hack to make alt-{left,right} work again in iTerm2
iTerm2 deviates from protocol, so back out c3c832761 (Stop using stack for
kitty progressive enhancement, 2024-08-03) in that case.

Note that we use several ways of detecting iTerm2 (ITERM_PROFILE,
TERM_PROGRAM=iTerm.app, ITERM_SESSION_ID).
LC_TERMINAL seems superior because it works over ssh.

This new one should hopefully go away eventually.
2024-08-06 10:36:36 +02:00
Johannes Altmanninger
5acac84df9 Enable Cirrus CI again for some Linux targets
There are two failures remaining (focal-32bit and jammy-asan):
https://github.com/krobelus/fish-shell/runs/28339746247
2024-08-05 10:41:17 +02:00
Johannes Altmanninger
25724342e1 Cirrus: remove misplaced/redundant only_if 2024-08-05 10:41:17 +02:00