Commit Graph

5174 Commits

Author SHA1 Message Date
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
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
Shaik Azhar Madar
b31b77cf83 Update p4.fish
add `--` for the string match command, so that if the `$line` has any `-`'s in it will be ignored
2024-08-03 10:52:48 -05:00
EmilyGraceSeville7cf
4108306e45
feat: Yeoman support 2024-07-25 19:16:12 -07:00
Fabian Boehm
b3ed2f215b __fish_anyeditor: Add missing -- separator
My $EDITOR is set to "emacs" and "-nw", which breaks this
2024-07-23 17:04:23 +02:00
Johannes Altmanninger
4e0cb5d3e9 __fish_seen_subcommand_from: don't clobber global variable 2024-07-23 11:47:58 +02:00
Johannes Altmanninger
6feec60a8e completions: don't treat token at cursor as flag 2024-07-23 11:47:58 +02:00
Johannes Altmanninger
a35c3d4d10 competions/clasp: add namespace to helper function 2024-07-23 11:47:58 +02:00
Lzu Tao
d9e5c6527f
Add description for git log -L 2024-07-20 13:54:21 -07:00
Mahmoud Al-Qudsi
6020fc497a Patch __fish_seen_argument to support --foo=arg
...when searching for long arguments by name/key.

Closes #10615.
2024-07-14 21:05:52 -05: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
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
f8ebe346a9
Implement jump-to-matching-bracket motion and bind % (percent) in vi mode
Part of #1842
2024-06-30 11:58:10 -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
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
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
Mahmoud Al-Qudsi
4d7ef1fad8 Speed up kldload descriptions with alternative to __fish_whatis
__kld_whatis is an order of magnitude faster than calling `whatis` by means of
`__fish_whatis`. (It could be even faster if we could somehow tell `string
replace` to return after the first result, since the .Nd line comes at the start
of the file.)

It still takes some ~3.5 to print descriptions for all available klds (864 under
FreeBSD 13), so we still need to decide when it's prudent to do so and when it's
not.
2024-06-24 15:21:06 -05:00
Mahmoud Al-Qudsi
d914f4e991 Fix broken __fish_whatis
This has been broken for a *long* time.
2024-06-24 14:30:37 -05:00
Mahmoud Al-Qudsi
245ee466cb completions/magento: remove sed dependency
This runs in about half the time, too.
2024-06-23 18:08:34 -05:00
Jean-Bernard Valentaten
3c74f14569
completions/magento: Fixes module aggregation for module related commands (#10446)
* completions/magento: Fixes module aggregation for module related commmands

Previousely when attempting completion for commands `module:enable`,
`mmodule:disable` and `module:uninstall` and error would be disaplyed,
stating that "magento" was not found.
Upon inspection of the issue in the related completion script it became
clear that:
1. The shell command `magento` does not exist as the CLI script of
   Magentoresides under `bin/magento`.
2. The module aggregation would not work after referncing the
   appropriate CLI command as an undeclared variable was being
   introspected.
3. Using Magento's CLI command took too long to respond as it has to
   bootstrap the whole Magento stack in order to deliver modules.

Thus the whole aggregation was rewritten to a form that actually works
and reduces the aggregation to reading the appropriate information
directly from the configuration file, provided that the file exists and
PHP is installed.

* completions/magento: Refactors module aggregation for module related commmands to not use PHP script

Executing random scripts from fish completion poses a threat to the
system. While this would indicate that the Magento installation has been
corrupted, it still is better to not run `app/etc/config.php` to get
hold of the modules.
Thus the module aggregation was rewritten to make use of `sed` instead,
which has the additional benefit of being faster than using PHP.
2024-06-23 18:05:52 -05:00
Lzu Tao
e0266067c4 git: completion for git commit --edit 2024-06-22 20:00:31 +00:00
Schlomo Schapiro
b3a16e0993
Show only writeable volumes
to exclude system volume
2024-06-19 09:17:14 -07:00
Schlomo Schapiro
f0c8f7406c
Extend diskutil eject to suggest volumes
Extend `diskutil eject` completion to also suggest mounted volumes.

Fixes #10573
2024-06-19 09:17:14 -07:00
Manuel Krebs
27c7578760 Add completions for dust 2024-06-19 02:10:52 +02:00
Lzu Tao
d370adf5fe git: allow path completion after git reset -- 2024-06-15 11:59:24 -07:00
iselda aiello
bac222e001 Move cursor back one space when deleting in vi visual mode
Fixes #10394
2024-06-15 11:44:32 -07:00
Shun Sakai
525a39b42c Add completions for actionlint 2024-06-12 08:10:57 +02:00
Mark Huang
1d8b10399a apt list completions 2024-06-12 08:10:38 +02:00
Fabian Boehm
f59cdfaa8d fish_add_path: Be more informative in verbose mode
One issue with fish_add_path at the moment is that it is sometimes a bit too intransparent.

You'll try to add a path, but it won't appear - was that because it wasn't a directory,
or because it doesn't exist, or because it was already included?

If it isn't usable after, did fish_add_path not add it because of something or did something *else* remove it?

So we give more explanations - "skipping this because it's a file", "not setting anything because no paths are left to add", ...
2024-06-06 16:47:39 +02:00
Fabian Boehm
6706b15fbc fish_add_path: Automatically enable verbose mode for interactive use
fish_add_path can be used either interactively, in the commandline,
or in config.fish. That's its greatest strength, it's a very
DWIM-style command.

One of the compromises that entails, however, is that it can't really
be very loud about what it does. If it skips a path, it can't write a
warning because it might be used in config.fish.

But it *can* if it's used interactively. So we try to detect that case
and enable verbose mode automatically.

That means if you do

```fish
fish_add_path /opt/mytool/bin/mytool
```

it may tell you "Skipping path because it is a file instead of a
directory:".

The check isn't perfect, it goes through status current-command and
isatty, but it should be good for most cases (and be false in config.fish).
2024-06-06 16:47:39 +02:00
tesuji
01e958d2fb
git: add completion for sparse-checkout subcommand (#10542) 2024-06-02 22:02:06 -05:00
Mahmoud Al-Qudsi
9f0e034fad Fix curl data string from path completions
Closes #10539.
2024-06-02 21:58:54 -05:00
Mahmoud Al-Qudsi
fc9a743622 completions/env: overhaul completions
The value completions were rendered almost entirely useless due to the forced
inclusion of file completions at all tokens, including in the head/command
position thanks to the use of `__fish_complete_subcommand` which doesn't
understand the semantics of `env` and expects something like `ssh`. But we don't
need it at all.
2024-05-31 20:49:48 -05:00
Mahmoud Al-Qudsi
e1ee193822 Speed up __fish_make_cache_dir
Don't fork/exec an external process, especially one performing IO, if we don't
have to.

This, in turn, speeds up __fish_source_cached_completions which is rather slow
under WSL (and slower than it needs to be on other platforms).
2024-05-30 17:03:03 -05:00
Mahmoud Al-Qudsi
98642d307a Don't use a graphical browser under SSH
...unless X is also being forwarded.

Someone else will have to figure out the Wayland equivalent (if that even
exists). Not my monkey, not my circus.
2024-05-30 16:15:07 -05:00