Commit Graph

19543 Commits

Author SHA1 Message Date
Peter Ammon
925382dc3e
Make make_pkg.sh create fat binaries again on macOS 2024-07-07 14:53:17 -07:00
Peter Ammon
c90862cd3d
Remove legacy Mac.cmake 2024-07-07 12:25:47 -07:00
Mahmoud Al-Qudsi
2bfa7db7bc Restructure __fish_seen_subcommand_from
Both are plenty fast enough, but this way the output of fish_trace isn't
completely taken over by the loops (seems fair since fish_trace probably gets
used rather heavily for completions).
2024-07-07 14:07:05 -05:00
Mahmoud Al-Qudsi
11be48fc38 Dramatically speed up npm/yarn completions
These go from a minimum of 5s in release mode to instantaneous. Worst case was
more than 30s when we didn't find enough matches to end early.
2024-07-07 14:05:12 -05:00
Mahmoud Al-Qudsi
a33d12fe53 Silence string match expression 2024-07-07 13:08:42 -05:00
Mahmoud Al-Qudsi
725bcef117 Update clasp completions (#10377)
Commit would not rebase cleanly.
Closes #10377.

Co-Authored-By: EmilyGraceSeville7cf <EmilyGraceSeville7cfg@gmail.com>
2024-07-07 12:21:37 -05:00
Mahmoud Al-Qudsi
f4b01bb638 Fix typo in npm completions: isntall -> install 2024-07-07 11:47:48 -05:00
Henrik Hørlück Berg
75da00df94
Fix short/long delimiter in string {match,replace}
- We use `()` not `[]`, as can be seen in e.g. `string split`
2024-07-06 16:18:14 +02:00
Peter Ammon
96c5139254
Build, codesign, and notarize macOS packages in CI
This adds a new workflow and script to build macOS packages in GitHub CI.
It also adds some documentation for the process.
2024-07-05 17:29:28 -07:00
Peter Ammon
e67ffc1a3b
Revert accidentally pushed commits
This reverts commit 81de0ee97b.
This reverts commit b4450f0ee5.
This reverts commit d5a128d342.
This reverts commit 580028816c.
2024-07-04 19:01:11 -07:00
Peter Ammon
81de0ee97b
try 1.79 2024-07-04 18:52:21 -07:00
Peter Ammon
b4450f0ee5
more 2024-07-04 18:08:22 -07:00
Peter Ammon
d5a128d342
more 2024-07-04 17:21:54 -07:00
Peter Ammon
580028816c
Add a script to automate macOS codesign 2024-07-04 15:35:29 -07:00
Fabian Boehm
70242ce38c reader: Fix external modes again
Missed in the port
2024-07-03 20:39:25 +02:00
Mahmoud Al-Qudsi
8b7597913e Add tests for string match/replace --max-matches 2024-06-30 17:51:50 -05:00
Mahmoud Al-Qudsi
f975e1c9e5 Document string match/replace --max-matches 2024-06-30 17:51:50 -05:00
Mahmoud Al-Qudsi
93f8385448 Add option to speed up string match/replace with --max-matches
I've often needed a way to get the last bit of performance out of unwieldy
completions that involve a lot of string processing (apt completions come to
mind, and I ran into it just now with parsing man pages for kldload
completions).

Since many times we are looking for just one exact string in the haystack, an
easy optimization here is to introduce a way for `string match` or `string
replace` to early exit after a specific number of matches (typically one) have
been found.

Depending on the size of the input, this can be a huge boon. For example,
parsing the description from FreeBSD kernel module man pages with

    zcat /usr/share/man/man4/zfs.4.gz | string match -m1 '.Nd *'

runs 35% faster with -m1 than without, while processing all files under
/usr/share/man/man4/*.4.gz in a loop (so a mix of files ranging from very short
to moderately long) runs about 10% faster overall with -m1.
2024-06-30 17:51:50 -05:00
Peter Ammon
204663f1b8
Minor cleanup of apply_var_assignments
Simplify the function signature and calls sites.
2024-06-30 15:27:49 -07:00
Peter Ammon
b5fd8d697b
Minor refactor of completer perform_for_commandline 2024-06-30 13:59:22 -07:00
Peter Ammon
8db7f6d8ba
Fix an errant tilde 2024-06-30 13:05:19 -07:00
visrosa
7260774fc3
Update less.fish
Preliminary work.  Might be important to check version if options I added aren't widely available.

Changed some short options to old-style options since they can't be grouped and don't even need spaces before their arguments, such as `less -ooutputfile` which creates `outputfile`.

The -Dxcolor argument is commented out because its arguments follow complex rules I didn't look into in depth
2024-06-30 13:00:19 -07:00
Joe Adams
2ad4454e52
give the two pages of the functions tab individual scrollbars 2024-06-30 12:50:00 -07:00
Nikita Bobko
e03e5e116d
fish_vi_key_bindings: add 'ab' and 'ib' vi text object
Part of #1842

The implementation is obviously isn't 100% vi compatible, but works good enough
for major cases

This commit depends on previous commits where jump-{to, till}-matching-bracket
motions were introduces
2024-06-30 11:58:10 -07:00
Nikita Bobko
67e190876a
Implement jump-till-matching-bracket input function
Part of #1842

It's like jump-to-matching-bracket, but jumps right before the bracket

I will use it to mimic vi 'ab' and 'ib' text objects in the next commit

Given complicated semantics of jump-till-matching-bracket, an alternative name
could be 'jump-inside-matching-brackets'. But that would make names non-symmetrical.
I'm not sure what is worse.
2024-06-30 11:58:10 -07:00
Nikita Bobko
f8ebe346a9
Implement jump-to-matching-bracket motion and bind % (percent) in vi mode
Part of #1842
2024-06-30 11:58:10 -07:00
Nikita Bobko
c966c19c56
Refactoring. Decompose ReaderData.jump function to two functions
Part of #1842

Split to:
- jump_and_remember_last_jump. What previously was called jump, now called
  jump_and_remember_last_jump
- jump. Only jump, don't remember last jump. Now it's also possible to pass
  vector of targets

The commit is pure refactoring, no functional changes are introduced.
The refactoring is needed for the next commits
2024-06-30 11:58:10 -07:00
Peter Ammon
1cbd18cc30
Tweak the allowed clippy set and fix some 2024-06-30 11:38:15 -07:00
Peter Ammon
90535d5b51
Allow clippy::ptr_arg and fix cases 2024-06-29 18:48:49 -07:00
Peter Ammon
cce2aab371
Rename binary_semaphore_t to BinarySemaphore 2024-06-29 18:07:11 -07:00
Peter Ammon
266852327f
Rename fd_readable_set_t to FdReadableSet 2024-06-29 18:06:21 -07:00
Peter Ammon
2d35d3f3c7
Remove yet more dead code 2024-06-29 18:03:52 -07:00
Peter Ammon
6b4dbf3b05
Remove additional dead code 2024-06-29 18:03:52 -07:00
Peter Ammon
1ed256d328
Remove RefCells from ExecutionContext and just make it mut
No more storing these in Parser; big simplification.
2024-06-29 18:03:52 -07:00
Peter Ammon
aa50e4f8c4
Remove some more dead code 2024-06-29 18:03:52 -07:00
Peter Ammon
606b668fff
Remove the pointer module
This is now unused.
2024-06-29 18:03:52 -07:00
Peter Ammon
c212ac95e9
Thread a reference to a line counter into parse execution
Simplify Parser by removing the reference to the execution context
2024-06-29 18:03:52 -07:00
Peter Ammon
b00ab4673b
Adopt the new line counting machinery in parse_execution 2024-06-29 18:03:52 -07:00
Peter Ammon
300fcfdba7
Factor out line counting
This moves the line counting logic from parse_execution into a new type, in
preparation for further refactoring.
2024-06-29 18:03:52 -07:00
Peter Ammon
ad1ea94405
Remove an Option from the parsed source ref in parse_execution
This was never None.
2024-06-29 18:03:52 -07:00
Peter Ammon
3aa12c1be9
Rename ParseExecutionContext to ExecutionContext 2024-06-29 18:03:52 -07:00
Kendell R
2a0f7e411f
don't error if only dependencies or devDependencies are present (#10594) 2024-06-29 18:01:41 -05:00
Mahmoud Al-Qudsi
8f563846e8
Compile in release mode for at least one CI runner (#10591)
When we changed our default from RelWithDebInfo to Debug, we inadvertently ended
up with all CI building and running in Debug mode. Change at least one of them
back to Release to make sure we don't have any optimizations that cause funky
stuff.

I'm changing the Ubuntu CI image because it's hopefully the fastest (since rust
is relatively dog-slow to compile in release mode).
2024-06-27 21:46:18 -05:00
Mahmoud Al-Qudsi
b5f5fa98bf Fix __fish_describe_command integration test under macOS
__fish_apropos is a huge hack under macOS and it seems that it's either broken
or man pages are missing/not indexed under CI. In all cases, hard-code the
results of __fish_describe_command to test the integration machinery
specifically and get the test to pass under macOS CI.
2024-06-27 21:35:06 -05:00
Mahmoud Al-Qudsi
dd7d537d90 Add regression test for command completion descriptions 2024-06-27 20:45:38 -05:00
Mahmoud Al-Qudsi
0adebdfbc4 Fix completely broken __fish_describe_command integration
Command completion descriptions were not being generated from `apropos`. Well,
they were being generated but that was not being correctly used by fish core.

Not sure when this was broken, but there's a possibility it was during the rust
port.

In addition to simply not working, it seems the old code tried to avoid
allocations but String::split_at_mut() allocates a new string (since one
allocation from the global allocator can't be split into two allocations to be
freed separately). Use `String::as_mut_utfstr()` before splitting the &wstr
instead of splitting the &str to actually do this alloc-free.
2024-06-27 20:43:14 -05:00
Mahmoud Al-Qudsi
ee4d578171 completions/env: Fix errant loud string match
This was vexing me for a while because the extraneous output presented as a
valid (but unwanted) completion, i.e. with RUSTC_WRAPPER exported, `env RUSTC_W`
would offer `RUSTC_W=` and `RUSTC_WRAPPER=` as completions (when only the latter
should have been offered up).
2024-06-26 19:10:51 -05:00
Mahmoud Al-Qudsi
f711c874ce Fix broken __fish_bin_dir when running out of build directory
`exec_path` is the path to the `fish` binary itself. This would cause the shell
to try to execute /foo/bar/fish/fish, which would, of course, fail.
2024-06-26 19:01:57 -05:00
Johannes Altmanninger
90150e1729 fish_key_reader: enable terminal protocols again
Fixes 29f2da8d1 (Toggle terminal protocols lazily, 2024-05-16).
2024-06-25 19:55:24 +02:00
Ryan Patterson
2d9f8547e2 Fix completion for port
This blames to a40b019, when @floam made some changes to various completions,
but this one seems to not quite fit the pattern and had a copy/paste error
resulting in using an undeclared variable.

Also disable filename completion on port.
2024-06-25 22:18:53 +08:00