Commit Graph

2454 Commits

Author SHA1 Message Date
Fabian Boehm
78c9482822 Reformat share/**.fish with newlines collapsed 2024-02-27 16:25:01 +01:00
Mathis Chenuet
73d760560b
Add completion for pstree (#10317)
* Add completion for pstree.fish

* use fish functions, much better
2024-02-26 17:39:11 +01:00
may
66aab66670
add recent commits to completion for git diff (#10321) 2024-02-25 14:36:05 -06:00
Jadi
e207f8464e Make descriptions shorter: iex, jhipster, lpadmin, mocp, rmmod 2024-02-22 18:59:08 +01:00
Jason Nader
fc58b9c68f completions: add ssh -D option 2024-02-22 18:58:04 +01:00
Jason Nader
2f332f0019 completions: update 'echo' 2024-02-20 17:40:35 +01:00
Johannes Altmanninger
26ea024e74 completions/xdg-mime: fix off-by-one error and allow multiple filetypes 2024-02-16 07:45:22 +01:00
Emily Grace Seville
623f3463a5
feat: cobra-cli support (#10293)
* feat: cobra-cli support

* fix: cobra-cli completion
2024-02-10 16:52:31 +01:00
Theodore Ehrenborg
263197dcb7 Typo 2024-01-31 08:06:34 +01:00
Johannes Altmanninger
33a9659cd1 Fix stale name of --tokens-expand option
Missed in 368017905 (builtin commandline: -x for expanded tokens, supplanting
-o, 2024-01-06).
2024-01-27 20:09:33 +01:00
Daniel Bretoi
6f797ac958
Update just.fish to handle descriptions for completions (#10260)
* Update just.fish to handle descriptions for completions

This change updates fish completions to also include descriptions for justfile recipes. It has been tested with descriptions for recipes with arguments as well

* rely on fish only (avoid sed)
2024-01-27 18:58:24 +01:00
Johannes Altmanninger
37c380d885 completions/git: add send-email 2024-01-27 17:57:48 +01:00
Jason Nader
28d9f1878d completions: fix wg-quick interface completions
wg outputs space separated list
2024-01-27 11:40:57 +01:00
Johannes Altmanninger
29f35d6cdf completion: adopt commandline -x replacing deprecated -o
This gives us more accurate completions because completion scripts get
expanded paths
2024-01-27 09:28:06 +01:00
Johannes Altmanninger
798527d79a completions: fix double evaluation of tokenized commandline
Fix cases like

    eval my-cmd (commandline -o)
    complete -C "my-cmd $(commandline -o)"

In both cases, we spuriously evaluate tokens like "(inside-quoted-string)"
as command substitutions. Fix this by escaping the strings.  The momentarily
regresses the intended purpose of "eval" -- to expand variables -- but the
next commit will fix that.
2024-01-27 09:28:06 +01:00
Johannes Altmanninger
368017905e builtin commandline: -x for expanded tokens, supplanting -o
Issue #10194 reports Cobra completions do

    set -l args (commandline -opc)
    eval $args[1] __complete $args[2..] (commandline -ct | string escape)

The intent behind "eval" is to expand variables and tildes in "$args".
Fair enough. Several of our own completions do the same, see the next commit.

The problem with "commandline -o" + "eval" is that the former already
removes quotes that are  relevant for "eval". This becomes a problem if $args
contains quoted () or {}, for example this command will wrongly execute a
command substituion:

    git --work-tree='(launch-missiles)' <TAB>

It is possible to escape the string the tokens before running eval, but
then there will be no expansion of variables etc.  The problem is that
"commandline -o" only unescapes tokens so they end up in a weird state
somewhere in-between what the user typed and the expanded version.

Remove the need for "eval" by introducing "commandline -x" which expands
things like variables and braces. This enables custom completion scripts to
be aware of shell variables without eval, see the added test for completions
to "make -C $var/some/dir ".

This means that essentially all third party scripts should migrate from
"commandline -o" to "commandline -x". For example

    set -l tokens
    if commandline -x >/dev/null 2>&1
        set tokens (commandline -xpc)
    else
        set tokens (commandline -opc)
    end

Since this is mainly used for completions, the expansion skips command
substitutions.  They are passed through as-is (instead of cancelling or
expanding to nothing) to make custom completion scripts work reasonably well
in the common case. Of course there are cases where we would want to expand
command substitutions here, so I'm not sure.
2024-01-27 09:28:06 +01:00
Daniel Bretoi
c78750499d
Dynamic Completion for Justfile Recipes (#10244)
* Create just.fish

justfile completions for tasks similar to make completions for targets

* no need for the match at all
2024-01-22 20:13:10 +01:00
Asuka Minato
0f97111290
add more strace completion (#10227)
* Update strace.fish

* Update strace.fish

* upper case
2024-01-22 20:12:43 +01:00
Mark Huang
65cf6ada56 completions for apt and apt-get 2024-01-21 14:21:44 +01:00
Fabian Boehm
a66fa5262e Cache ykman completions
Also 140ms
2024-01-21 14:18:50 +01:00
Fabian Boehm
b4d9189fd3 Cache pip{,2,3,env} completions
These take a *lot* of time - `pip3` takes 180ms, `pipenv` takes 320ms
on my system.

Note that this removes a number of obsolete workarounds - pip's was
fixed in 2017 (and pip2 is less and less of a thing), pipenv's change
was in 2019.

Since these are packaging tools with access to the internet they
should really be kept up-to-date, so it is unlikely someone still uses
these old versions.
2024-01-21 14:18:50 +01:00
Paul Ouellette
2cb60bed10 Remove share/completions/highlight.fish
Highlight ships its own completion script:
https://gitlab.com/saalen/highlight/-/blob/master/sh-completion/highlight.fish
2024-01-20 11:39:48 +01:00
Ikko Eltociear Ashimine
1e925857f0 Update iwctl.fish
colum -> column
2024-01-18 19:34:30 +01:00
Himadri Bhattacharjee
5389d84285 shorten long descriptions for the cargo command 2024-01-16 22:16:36 +01:00
Peter Collingbourne
0b3e9609f1 completions/fastboot: declare -s as taking an argument, add argument completions 2024-01-12 20:45:56 +01:00
yinm
b583145a00 Shorten long descriptions 2024-01-12 17:53:49 +01:00
Johannes Altmanninger
57d7c46d22 completions: fix some completions to not look at other commands on the command line 2024-01-07 19:04:54 +01:00
Johannes Altmanninger
d71aae7d3b completions/ip: remove obsolete workaround
This workaround already exists in core completion machinery.
2024-01-07 19:04:54 +01:00
Fabian Boehm
16c2c14fb4 Restyle 2024-01-07 15:13:34 +01:00
Johannes Altmanninger
f42b7d30b3 completions/ant: don't look at tokens from adjacent commands 2024-01-06 08:44:23 +01:00
Josef Litoš
ee837f254b feat: adb completion cleared of awk 2024-01-04 16:13:03 +01:00
Damien Picard
4f3e7ddef0 Completions: fix Blender completions when it prints to stderr
Some of the completions recently introduced called Blender itself to query some
arguments, and Blender sometimes prints messages to stderr. This output was not
filtered, resulting in the shell printing irrelevant messages during completion.
2024-01-04 16:11:51 +01:00
David Adam
c10d00599b completions/ninja: add --verbose option 2024-01-03 23:17:55 +08:00
David Adam
850c57bbb3 completions/funced: clarify -i description
Work on #10053.
2023-12-31 23:04:19 +08:00
jydeng
b9b850f286 add more subcommands for apt (#10100) 2023-12-31 23:00:15 +08:00
Damien Picard
9132684617 completions: improve Blender completions
- Replace short options with old-style options: even though they are
  single-letter, Blender's options cannot be combined.
- Add comments to separate blocks of options, mirroring Blender's help message.
- Add missing options: render-frame, python-use-system-env, register-allusers,
  unregister, unregister-allusers.
- Remove options: debug-gpu-disable-ssbo, debug-gpu-renderdoc, -R.
- Fix typos:
  - debug-depsgraph-eval (was -evel)
  - debug-depsgraph-pretty (was -time)
  - app-template (was open-last)
- Update output formats:
  - Add descriptions.
  - Add HDR, TIFF, OpenEXR, OpenEXR Multilayer, FFmpeg, Cineon, DPX, JPEG 2000,
    and WebP, which are optional but generally available.
  - Remove IRIZ, which is no longer available.
- Fix arguments for --use-extension: they should be 0 or 1, not true or false.
- Make env-system-* options require a parameter.
- Improve --add-ons by querying the list of add-ons inside Blender rather than a
  hardcoded path. This is because Blender's add-on modules may come from many
  different paths which depend on platform.
- Fix __blender_echo_input_file_name, by relying on extension.
- Fix listing of scene datablocks inside Blend file.
- Add listing of Python text datablocks to execute inside Blend file.

Closes #10150
2023-12-30 16:20:39 +01:00
Amy Grace
6fe4e3d8a9 completions: add xxd
Closes #10137

(cherry picked from commit 36ed2b79c2)
2023-12-30 10:18:59 +01:00
Grzegorz Milka
c369080963 Add git stash push completions
Closes #10147

(cherry picked from commit 03198b7fd3)
2023-12-30 10:09:48 +01:00
tangowithfoxtrot
cf98b27544 add completions for bws
Closes #10165

(cherry picked from commit 7370e38069)
2023-12-30 09:33:05 +01:00
Johannes Altmanninger
81c8cd1b61 completions: use POSIX character classes with sed
\s and \S are not supported BSD sed.

Fixes #10163
2023-12-27 17:11:01 +01:00
Rudolf Lovrenčić
2e89e0c205 Add object files to ninja completions
When working on a C or C++ projects, it is often handy to compile a
single file (e.g. large refactoring where many files fail to compile so
compiling a single file results in less compiler errors making the compiler
output significantly easier to read and navigate). Current completion offers
only ninja targets which are usually just top level binaries. This commit makes
object files and library files to be offered in the ninja completion.

The change is inspired by the zsh ninja completion [1], but aims to reduce noise
by only matching for entries ending in ".o", ".so" or ".a".

[1] c828f06e08/src/zsh/_ninja (L30)
2023-12-17 20:50:41 -08:00
sigmaSd
df3c5ab402 use a better method 2023-12-17 20:39:58 -08:00
sigmaSd
f924f06df7 fix deno task completion for jsonc 2023-12-17 20:39:58 -08:00
Amy Grace
00ffc397b4
completions: add rename (#10136)
* completions: add rename

* add completions for other versions of `rename`
2023-12-10 21:40:38 +01:00
Amy Grace
b7a85fe172
completions: add smerge (Sublime Merge CLI tool) (#10135)
* completions: add smerge (Sublime Merge CLI tool)

* completions: add `-o` (and file completion) to `smerge mergetool`
2023-12-10 11:50:22 +01:00
Amy Grace
d1a906026a completions: add BSD calendar 2023-12-10 11:49:34 +01:00
Ivan Kovnatsky
8c36c21e2e
Add git branch --[no-,contains] completions (#10133)
* Add `git branch --[no-,contains]` completions

* Add __fish_git_commits as an argument
2023-12-10 11:41:58 +01:00
SanskritFritz
684f44bca3 Tab completions for ncdu completed 2023-12-10 11:41:26 +01:00
Nater0214
ca705fcbb5 completions: add airmon-ng 2023-12-10 11:40:53 +01:00
NextAlone
382005c33e
completion(usbip): support ipv6 (#10113)
* completion(usbip): support ipv6

Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>

* completion(usbip): use fish string match

Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>

* fix: support --remote and -r both

Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>

---------

Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
2023-12-10 11:40:17 +01:00