Commit graph

4876 commits

Author SHA1 Message Date
Fabian Boehm
2cf22596e7 Disable reflow handling for WezTerm too
Seems to work fine
2023-09-22 17:13:28 +02:00
Fabian Boehm
b03327f5d2 __fish_complete_command: Fix --foo= logic
This was already supposed to handle `--foo=bar<TAB>` cases, except it
printed the `--foo=` again, causing fish to take that as part of the
token.

See #9538 for a similar thing with __fish_complete_directories.

Fixes #10011
2023-09-10 18:16:41 +02:00
Fabian Boehm
fc95eca257 share/config.fish: Skip __fish_set_locale if $LANG is already set
This is the most common and sensible env var, we check it outside,
so we can skip loading the function at all if we already know it's not
gonna do anything.

This is done on every startup of every single fish, and it saves ~0.2ms.
2023-09-09 15:53:20 +02:00
Marcelo Mendes Spessoto Junior
7534572d99 Shortening node.fish completions
Signed-off-by: Marcelo Mendes Spessoto Junior <marcelospe@shinji.linux.ime.usp.br>
2023-09-09 08:31:19 +02:00
Jason Nader
d6e234c60c
completions: add ibmcloud (#10004)
* completions: add ibmcloud

* Update ibmcloud.fish
2023-09-09 08:30:16 +02:00
Asuka Minato
3bf80b2374
add gcc completion for link lib (#10007)
* add completion for lib

* use path basename && use -a
2023-09-09 08:29:39 +02:00
Fabian Boehm
180692fb29 completion: Set up wrapping for gw/gradlew
These were set up as commands in the actual gradle completions, but
they would never be loaded.
2023-09-07 08:06:55 +02:00
Xiretza
fff320b56b completions: make: respect line continuations in recipes
Without this, a recipe containing a trailing backslash followed by a line not
beginning with tab (like any non-continued recipe lines would) would result in
the continuation showing up in completions.

Whenever a line ends in a backslash, consider the next line invalid as a target.

Regex explanation:

^([^#]*[^#\\])? -- optional prefix not containing comment character and not
                   ending in backslash
(\\\\)*\\$      -- 2n+1 backslashes at end of line (handles escaped backslashes)
2023-09-05 11:40:05 +02:00
Fabian Boehm
dcebffb9e7 funced: Note --wait
See #9999
2023-09-05 09:19:21 +02:00
ghostflyby
33ec25da8a completion for macOS java_home 2023-09-01 10:27:18 -07:00
Fabian Boehm
b54faf9469 webconfig: Fix box shadow in dark mode
This changed from a separate div to directly on the body
2023-08-29 14:29:20 +02:00
Fabian Boehm
209af84a37 webconfig: Make prompt selectable 2023-08-29 14:29:20 +02:00
Fabian Boehm
5e6f187ca6
Merge branch 'master' into rewrite/webconfig-to-alpinejs 2023-08-29 14:25:02 +02:00
Yuntao Zhao
9d0d16686e
Improve completion for rpm-ostree (#9910)
* Some temporary change until compose - commit

* First draft

* Fix an error that prints double completion

* Fix completion errors. Add rpm-ostree alias.

Fix cimpletion where it trigger by multiple commands.
Add update and remove, which are aliases for upgrade and uninstall.

* Remove -r when it is unnecessary

Some command need path completion for arguments no matter what,
which makes -r flag useless

* Remove -x for compose image
-x does not block the path anyway

* Add missing short otpion in compose image

Revert the last change to block -l completion

* Fix description

Fix multiple description.
2023-08-26 15:05:52 +02:00
Jason Nader
f6123d235c scp completions: fix path escaping 2023-08-26 15:04:48 +02:00
Fabian Boehm
5b1ff9459a sample_prompts/scales: Silence one last git call
Fixes #9975
2023-08-23 19:15:05 +02:00
Fabian Boehm
81cd035950 print_apt_packages: Go back to apt-cache for non-installed packages
Unfortunately, /var/lib/dpkg/status on recent-ish Debian versions at
least only contains the *installed* packages, rendering this solution
broken.

What we do instead is:

1. Remove a useless newline from each package, so our limit would now
let more full package data sets through
2. Increase the limit by 5x

This yields a completion that runs in ~800ms instead of ~700ms on a
raspberry pi, but gives ~10x the candidates, compared to the old
apt-cache version.

This partially reverts 96deaae7d8
2023-08-22 22:17:22 +02:00
figurantpp
6473a9c763 Shortens rsync completion description 2023-08-21 17:51:15 +02:00
figurantpp
5a934e7ae3 Removed type declarations from node descriptions 2023-08-21 17:51:15 +02:00
ysthakur
0f19d7118b
Replace more escapes with quotes in man parser (#9961)
* Replace \(aq with "'" in man parser

* Also replace oq, dq, lq, and rq
2023-08-19 17:10:22 +02:00
Roland Fredenhagen
556bee6893
completions/iwctl: Show network details in completion (#9960)
* completions/iwctl: Show network details in completion

* apply review comments
2023-08-19 17:08:54 +02:00
Axlefublr
fd68aca6ea
fix __fish_list_current_token not recognizing ~ as $HOME (#9954)
* fix __fish_list_current_token not recognizing ~ as $HOME

* right. it was supposed to be $HOME. lol.
2023-08-16 22:05:59 +02:00
Fabian Boehm
1166424eeb Replace some uses of __fish_complete_list 2023-08-16 21:58:07 +02:00
Fabian Boehm
ec42c2ecec completions/exif: Remove use of eval 2023-08-16 21:58:07 +02:00
Fabian Boehm
1dc65a694d completions/read: Remove long-removed "--mode-name" flag
Disabled in c6093ad782 (in 2.7.0)
2023-08-15 18:34:41 +02:00
Gregory Anders
69ef51f417 Enable PWD reporting for iTerm2 2023-08-14 18:09:12 +02:00
Roland Fredenhagen
408ab86090
Add iwctl completions (#9932)
* Add iwctl completions

* review-comments

* options
2023-08-10 19:35:27 +02:00
Emily Grace Seville
f9d21cc21d
Add horcrux completion (#9922)
* feat(completions): horcrux

* feat(changelog): mention completion

* fix(completion): condition for -n
2023-08-09 17:30:34 +02:00
Gabriel Górski
21ddfabb8d
Simplify and fix __fish_is_zfs_feature_enabled (#9939)
* Simplify and fix `__fish_is_zfs_feature_enabled`

Previously `__fish_is_zfs_feature_enabled` was doing
`<whitespace>$queried_feature<whitespace>` pattern matching which
was skipping the state part expected in the follow-up checking code.

Passing the dataset/snapshot in a `target` argument is pointless. As
none of the existing code attempts to do this plus it is also a
private function (`__` prefix), rename of the argument and removal
of extra text replacement should not be considered a breaking change.

* Changed the `&& \` into `|| return`

* Run `fish_indent`
2023-08-09 17:28:01 +02:00
AsukaMinato
9a9e133b18
add gcc completion lm lz lrt (#9919)
add some gcc completion options
2023-07-29 10:52:23 +08:00
AsukaMinato
2110b36426 more gcc -O completion
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
2023-07-27 17:44:41 +02:00
Emily Grace Seville
6ce2ffbbb0
Add Krita completions (#9903)
* feat(completions): support Krita

* feat(completions): support summary options for Krita

* feat(completions): support remaining options for Krita

* feat(completions): remove debug instructions

* feat(completions): hide completions for sizes for Krita

* feat(completions): fix Krita

* feat(changelog): mention new completion

* fix(completions): refactor Krita

* fix(completion): reformat

* feat(completion): dynamically generate workspace list

* fix(completion): refactor

* fix(completion): krita

* fix(completions): use printf
2023-07-27 17:43:51 +02:00
Emily Grace Seville
8d3885b9cb
Add Blender completions (#9905) 2023-07-27 17:42:55 +02:00
Fabian Boehm
ed881bcdd8 Make default theme use named colors only
This gives us the biggest chance that these are *visible* in the
terminal, which allows people to choose something nicer.

It changes two colors - the autosuggestion and the pager
description (i.e. the completion descriptions in the pager).

In a bunch of terminals I've tested these are pretty similar - for the
most part brblack for the suggestions is a bit brighter than 555, and
yellow for the descriptions is less blue
than the original.

We could also make the descriptions brblack, but that's for later.

Technically we are a bit naughty in having a few foreground and
background pairs that might not be visible,
but there's nothing we can do if someone makes white invisible on brblack.

Fixes #9913
Fixes #3443
2023-07-25 16:42:24 +02:00
EmilySeville7cfg
2bc605625e feat(completions): gimp support 2023-07-23 15:09:35 -07:00
Fabian Boehm
5f26c56ed5 completions/pactl: Fix matching objects
This didn't work for something like `pactl set-card-profile foo
<TAB>`,
because it didn't allow for the card name, as it would just print the
index again and again.
2023-07-19 18:13:40 +02:00
Fabian Boehm
bfd97adbda completions/rclone: Add version parsing
This had a weird, unnecessary and terrible backwards-incompatibility
in how you get the completions out.

I do not like it but I am in a good enough mood to work around it.

See #9878.
2023-07-15 14:25:41 +02:00
Fabian Boehm
493cbeb84c completions/git: Trim with the regex
This gives us another few percent.

It's not *technically* the same because `trim` would remove a run of
quotes, but that would be wrong anyway.
2023-07-13 18:05:55 +02:00
Fabian Boehm
dd26611c0f completions/git: Move some variables to the v1 path
No longer used elsewhere
2023-07-13 16:51:16 +02:00
Fabian Boehm
7f76f75966 completions/git: Add fast path for untracked files
It's super easy to get a lot of these and they'll otherwise slow down
the completions a lot.

This makes `git add <TAB>` ~5-6x faster with about 4000 untracked
files (a copy of the fish build directory). It goes from 1.5 seconds to
250ms.

This is just for the git >= 2.11 path, but the other one would require
more checking and since git 2.11 is almost 7 years old now that's not
worth it.
2023-07-13 16:46:22 +02:00
Fabian Boehm
1f1975689e completions/git: Don't check commandline so much
This just caches some checks, speeding up `git add ` completions by
~33% with 4000 matching files.
2023-07-13 16:31:33 +02:00
Fabian Boehm
2b0e3ba3b8 __fish_print_hostnames: Fix regex
This used `]` when it should have been `}`, which made the regex nonsensical

Broken since 94c12d84e2 in 2016
2023-07-11 20:50:56 +02:00
Fabian Boehm
1a11cee559 functions/cd: Optimize check for too many args
This ran two `test`s a `count` and one `echo`, which is a bit wasteful.

So instead, for the common case where you pass one argument, this will
run one `set -q`.

This can save off ~160 microseconds for each ordinary `cd`, which
speeds it up by a factor of ~2 (so 1000 runs of cd might take 260ms
instead of 550ms).

Ideally the cd function would just be incorporated into the builtin,
but that's a bigger change.
2023-07-11 18:01:29 +02:00
pd
ac2810e9ef Fix rclone autocompletion script sourcing issue in fish shell 2023-07-07 21:34:12 +02:00
may
e3e7ab77ad add stash completions to git show and git diff 2023-07-05 10:53:17 +08:00
Johannes Altmanninger
052823c120 history pager: delete selected history entry with Shift-Delete
After accidentally running a command that includes a pasted password, I want
to delete command from history. Today we need to recall or type (part of)
that command and type "history delete".  Let's maybe add a shortcut to do
this from the history pager.

The current shortcut is Shift+Delete. I don't think that's very discoverable,
maybe we should use Delete instead (but only if the cursor is at the end of
the commandline, otherwise delete a char).

Closes #9454
2023-07-04 18:42:11 +02:00
David Adam
472d7efe34 completions/status: add basename and dirname 2023-07-04 23:32:39 +08:00
Francois Laithier
a7ac92f62f Use __fish_complete_directories to help complete dirs only 2023-07-01 11:01:36 -07:00
Francois Laithier
911a5a97a8 Add completion option for curl
Add missing completion for curl's `--output-dir` option
2023-07-01 11:01:36 -07:00
Fabian Boehm
b043a1c35f completions/help: Add custom-prompt 2023-06-28 16:13:20 +02:00