Commit Graph

4376 Commits

Author SHA1 Message Date
EmilySeville7cfg
909cade1f5 Add __fish_list_windows_drives 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
fbbf498afb Enhance setx completion:
- more accurate hints
2022-01-26 21:37:39 -08:00
EmilySeville7cfg
05ba662dcd Fix reg completion:
- /s description fix
2022-01-26 21:37:39 -08:00
EmilySeville7cfg
cd64ed5d27 Fix awk command for cmdkey 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
e118bde5c8 Enhance cmdkey completion:
- error fixes
- more accurate hints
2022-01-26 21:37:39 -08:00
EmilySeville7cfg
0281017c5a Add __fish_list_windows_users function 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
2c55213b81 Replace ! with not for attributes 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
5f1384c6c3 Distribute code into several functions for reg 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
ee74ebd314 Completion for powershell command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
c7534b2dd5 Completion for schtasks command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
71f43c5fda Completion for rd command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
16c1850ae0 Complete for md command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
c3f928b2fa Hide /-y, /y when needed for copy command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
61a77ef9fc Hide /c, /k when needed for cmd command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
cd991d5936 /d support for cleanmgr command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
656d3479dc Drive suggestions for attrib command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
e137df393a Better /u, /p support for setx command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
ae95c072c9 Generate shorter passwords 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
16380074a5 --bytes instead of -c in __fish_generate_password 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
e08125c85a Format __fish_generate_password 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
832c0a3be2 Helper function __fish_generate_password add 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
76e200e3f5 Completions for cmdkey command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
9de5e1918f +/- hints for attrib command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
5574d13622 Fix setx completion 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
da1fdc758b Fix reg completion 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
5aac064b2c Fix second for loop in __fish_seen_argument 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
1bd01436d9 Completion for setx command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
4b6e4fb7f0 Remove unused var in reg.fish 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
3a89363132 Completion for reg command 2022-01-26 21:37:39 -08:00
EmilySeville7cfg
080c215d48 Completion for pause command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
529f82a990 Clean-up all completions 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
7c2e05f223 Completion for forfiles command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
2bd7daec20 Completion for copy command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
7f1ea27008 Windows options support in __fish_seen_argument 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
3c943d2836 Completion for comp command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
1a005a76ef Completion for ver command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
36eb310732 Completion for vol command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
8092d40cb7 Completion for cmd command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
064fd61bc4 Completion for cls command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
555166425b Completion for cleanmgr command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
bedb20e4b3 Completion for clean command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
63165085e1 Completion for choice command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
bf72247e1a Completion for attributes command 2022-01-26 21:37:38 -08:00
EmilySeville7cfg
4f07bb8824 Completion for attrib 2022-01-26 21:37:38 -08:00
Spenser Black
eb7603f1c6 Make __fish_git_is_rebasing respect git -C
Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>
2022-01-26 18:43:57 +01:00
Spenser Black
3b690214dc Add git checkout --[no-]recurse-submodules 2022-01-26 18:43:57 +01:00
Spenser Black
03b3891d73 Add git rebase --edit-todo completion 2022-01-26 18:43:57 +01:00
Spenser Black
3575bc6c19 Hide interactive rebase options when not rebasing
`--abort`, `--skip`, and `--continue` are hidden when a rebase isn't in
progress.
2022-01-26 18:43:57 +01:00
Spenser Black
4ae29ec1fe Add --prune option to git fetch and git pull 2022-01-26 18:43:57 +01:00
Spenser Black
2fcea496a9 Complete only filenames after git show -- 2022-01-26 18:43:57 +01:00
EmilySeville7cfg
36699d49d8 Specify program versions 2022-01-23 21:52:17 +08:00
EmilySeville7cfg
f881f70992 Completion for matlab command 2022-01-23 21:52:17 +08:00
EmilySeville7cfg
ec870fff93 Completion for octave command 2022-01-23 21:52:17 +08:00
exploide
229e315fc5 tar completion: added useful options 2022-01-23 14:33:07 +01:00
Aaron Gyes
b1deb8af89 down-or-search: shorten description 2022-01-22 21:12:01 -08:00
Aaron Gyes
1262469aea Shorten two more command's descriptions
Two columns at 119 width.
2022-01-22 21:04:26 -08:00
Aaron Gyes
ed0b6cdc9d Shorten fish_sigtrap_handler description.
We can now get two columuns in the pager hitting <TAB> at 124 cols
2022-01-22 20:57:48 -08:00
Aaron Gyes
4a6dbe0922 prompt_* functions: shorten their descriptions 2022-01-22 20:06:37 -08:00
Jeff Dickey
af11a628f9 git diff --quiet has no "-q" flag
https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---quiet
2022-01-22 13:17:11 +08:00
Dundar Göc
fe21cb44c9 entr 2022-01-21 18:11:48 -08:00
Dundar Göc
e8af17c191 lpadmin 2022-01-21 18:11:48 -08:00
Dundar Göc
864f5ca254 lpstat 2022-01-21 18:11:48 -08:00
Dundar Göc
954de44414 mocp 2022-01-21 18:11:48 -08:00
Dundar Göc
f45ca4aca4 completions(postgresql): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
cd52937771 completions(sass): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
48e686dae2 completions(latexmk): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
095aed64e0 completions(imagemagick): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
7667a51d93 completions(cdrecord): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
3bad45a933 completions(bison): shorten descriptions
Work on https://github.com/fish-shell/fish-shell/issues/6981
2022-01-21 18:11:48 -08:00
Fabian Homborg
b74f610a47 completions/gcc: Some small fixes
Remove some nonexistent options (my gcc does not know "-mdata"), fix
the longest description in all of fish and remove some argument
markers from the option.
2022-01-20 17:14:38 +01:00
Dundar Göc
157d8cfd74 completions(ant): shorten descriptions 2022-01-20 10:49:40 +01:00
Dundar Göc
8878e990a4 completion(ansible-playbook, ansible): shorten descriptions 2022-01-20 10:48:41 +01:00
Dundar Göc
87ce317716 completion(animate): shorten descriptions 2022-01-20 10:48:08 +01:00
Fabian Homborg
9d59254a72 themes: Resolve pager_selected_background
This sets the variable to the background value of
$fish_color_search_match, which fixes the case where you switch from a
theme with a set selected background (like our default, now) to one without.
2022-01-19 17:54:59 +01:00
Fabian Homborg
24f9fdd0a7 themes/default: Set pager selection to reverse
This makes it look okay on both light and dark backgrounds.
2022-01-19 17:23:42 +01:00
Fabian Homborg
89e85e05e0 completions/git: Add add --chmod option
Fixes #8652.
2022-01-18 19:20:27 +01:00
Dundar Göc
48652eebc1 completion: add completions for topgrade 2022-01-18 23:33:52 +08:00
dundargoc
9b3783d54a
completions: shorten descriptions for p4 (#8647)
Work towards #6981
2022-01-17 11:06:05 -08:00
Fabian Homborg
0127b237e7 completions/git: Complete heads for push
Fixes #8650
2022-01-17 17:49:00 +01:00
Jakub Panek
d5076572c8 completions(apk.fish): force file/parameter completion
Signed-off-by: Jakub Panek <me@panekj.dev>
2022-01-17 06:48:54 +01:00
Max Nordlund gmail
49a0362c12 Fix nmap --script completion
It's using GNU specific flags, which doesn't work on BSDs like macOS.

Instead this just formats the current time into
seconds and then the `math` builtin for calculating the 5 min timeout.
2022-01-16 15:13:57 +01:00
Johannes Altmanninger
04a905961d completions/conda.fish: use __fish_is_first_token
Closes #8614
2022-01-16 15:02:53 +01:00
Fabian Homborg
698b818935 Shorten default title
This now skips the "fish" bit and uses prompt_pwd to print a shorter title.

See #8641.
2022-01-16 11:17:31 +01:00
Fabian Homborg
30dc91225e css: Pick nicer fonts
Unfortunately the normal font families like "sans-serif" and
"monospace" are basically broken because the browser defaults are
decades old.

TODO: Inline code is barely distinguishable.
2022-01-13 16:23:54 +01:00
Fabian Homborg
cc796e4dfc Webconfig: Remove unused font declaration
This was for <code> tags, which we don't have here. The rest is
already all monospace and Source Code Pro has bugs on macOS.
2022-01-13 16:23:54 +01:00
Spenser Black
6ef726b285
Include tags in git push completions (#8630)
Resolves #8621
2022-01-11 21:27:23 +01:00
exploide
49a9610c31 completions: complete users for id command and added two further options 2022-01-08 13:51:52 +01:00
Kid
aa6e0cc157
Skip more leading commands in __fish_man_page (#8612)
* Skip leading `xargs` in `__fish_man_page`

* Complete the list

* `git` does not qualify either
2022-01-08 13:50:31 +01:00
Kid
491dd92ac2
Add isatty completion (#8609)
* Add `isatty` completion

* Keep order
2022-01-08 13:46:54 +01:00
David Adam
b4e8e5abff __fish_print_apt_packages: stringify
GNU tr is not Unicode-aware, and was corrupting descriptions that had
non-ASCII characters.

Additionally, rather than using the Unicode private use characters, use
the ASCII/UTF-8 record separator character as it was intended.

The sed command could probably be rewritten to do all the heavy lifting
here, but would be even less readable.

Closes #8575.
2022-01-06 23:55:18 +08:00
Fabian Homborg
41da16408a sample_prompts/disco: Actually use luminance for dir color
Instead of weirdly smearing the color, simply increase the values
until they are bright enough.

This prevents /tmp from being white, and guarantees visible colors for
all directories.
2022-01-05 18:14:24 +01:00
Kid
a0c2be5fc3 Fix xargs option completions 2022-01-04 19:02:08 +08:00
Daniil Baturin
f254692759 completions/opam: add completions for "opam switch" 2021-12-30 22:33:45 +01:00
ridiculousfish
37625053d4 fish_git_prompt: be careful about git config
fish_git_prompt may run certain git commands which may invoke certain
external programs as specified `.git/config`. Prevent this by suppressing
certain git config options.
2021-12-30 13:11:04 -08:00
Ilya Grigoriev
084967e560 webconfig.py: minor polish of is_chromeos_garcon
The `name` attribute I used in commit f725cd402d
is undocumented, and [someone discovered] that it does not exist for one 
possible browser on MacOS. This should make the code work correctly even in that case. 

This probably doesn't currently cause a problem, at least when 
`isMacOS10_12_5_OrLater()` is true, because of the ordering of the if 
statements in the `runThing` function.

[someone discovered]: https://bugs.python.org/issue43424#msg409087
2021-12-30 12:55:52 +01:00
Nils K
1877253f47
Pass all of $argv to pk-command-not-found (#8591)
Fixes #8579.
2021-12-28 12:56:31 +08:00
Johannes Altmanninger
ac428b23e5 completions/git: use our __fish_git wrapper for listing config values
Git completions use wrapper function __fish_git instead of directly
running git. This allows them to be aware of Git's global options, like
--git-dir. Let's use __fish_git also for listing config keys & values,
so it can more accurately list local (= per repo) git configuration.
2021-12-27 14:41:59 +01:00
Johannes Altmanninger
ee3a26d849 completions/git: fix completions for "git config"
We don't provide completions on "git config " because we require
"fish_is_nth_token 3". Confusingly, fish_is_nth_token only counts
tokens *before* the cursor, so 2 is the right number here.

While at it, fix a typo and delete an unused completion entry (it
ran conditional on __fish_is_first_arg, which is always false for a
git subcommand).
2021-12-27 14:41:24 +01:00
Kid
36be635393
Provide completions for complete without -c (#8587) 2021-12-26 13:49:28 -08:00
Kid
8abc6b2f8c
Provide completions for history without search subcommand (#8588) 2021-12-26 13:48:49 -08:00
Sergei Morozov
69b5a3535c
Add basic completion for mvn -pl switch (#8570)
This patch introduces basic completion of the -pl|--projects switch for
mvn. The implementation is quite naive but it's better than nothing. A more
robust implementation would require either scanning the filesystem or running
mvn which might slow down completion significantly.
This solution can be improved by using an XML parser instead of grep/sed.
2021-12-26 22:37:13 +01:00
Aaron Gyes
6c6a8f93e9 webconfig.py: don't handle except BaseException
These ought to be more specific.
2021-12-21 14:06:19 -08:00
Aaron Gyes
50d88e9712 controllers.js: remove unused variable cols[]
introduced in ba0b7133ad
2021-12-21 13:59:33 -08:00
Fabian Homborg
086d388932 Also read /etc/default/locale for the locale
Apparently a thing on Debian systems (whyyyyy)

Fixes #8557
2021-12-18 08:57:22 +01:00
Emily Grace Seville
077f1f2576 Redirect stderr of xclip to /dev/null
xclip will display an error when pasting if the clipboard contains
something that isn't text:
  Error: target STRING not available

Swallow this error.
2021-12-15 22:30:12 +08:00
Fabian Homborg
67dc86cfa4 webconfig: Skip colors not named in a theme
This is a stop gap. Ideally setting a theme would be idempotent. You
set it, all colors change to match it, even the ones it does not
specify.

However, I do not believe we can *erase* colors that aren't set, and
we don't currently do so in the CLI version. So skip setting these at
all, for now.

If a color is mentioned but empty, it will be set to empty.
2021-12-14 22:54:28 +01:00
Fabian Homborg
3daba1b070 webconfig: Stop translating named colors
If the theme says "brgreen", that's what we want the variable to say
after.

This used to translate it through our palette, so it ended up as
00ff00, which isn't the same.

This still keeps the idea that colors that aren't in the palette are
better, and it does it in a slightly roundabout way (translate color
string to rgb string, see if the rgb string is a key in that
translation dictionary), but it should work for now.
2021-12-14 22:51:54 +01:00
Aaron Gyes
4b018a7608 set completions: add more special variables, fix colors
* add --bold, --italics, all of them,
* and we add them as arguments so that they are do not
  render like long options, they are just self-descriptive
  literal strings in this context.
* solve an unneccessary global var.

Fixes #8518
2021-12-13 16:29:21 -08:00
Fabian Homborg
06fada7445 webconfig: Check variable name and value
Theoretically if this only includes simple characters, it won't cause
any issues. We already validate in other places but it doesn't hurt to
do this twice.
2021-12-13 21:59:08 +01:00
Fabian Homborg
c954d70e2f webconfig: Stop validating colors
Now that we have modifiers and can have backgrounds and such, simply
setting it as css style doesn't cut it.

So let's stop validating for now, the worst that can happen is that
the color isn't rendered.
2021-12-13 21:47:54 +01:00
Fabian Homborg
5a46a61ffb webconfig: Teach set_color short options
Since we now have .theme files we can't rely on it being normalized.
2021-12-13 21:47:54 +01:00
Fabian Homborg
ba0b7133ad webconfig: Allow transferring modifiers and backgrounds
This just simply passed the "color" value, which is just the
foreground color string.

Instead, we pass the actual object back, with the modifiers as bools
and foreground/background separate.

Our themes don't use background a lot, except in the pager, so this
never really came up.
2021-12-13 21:47:54 +01:00
Fabian Homborg
235581e8dc webconfig: Allow setting most pager colors
I'm not sure this ever worked before for most of these.

It currently still doesn't set the background, and the secondary
colors have a weird fallback.
2021-12-13 21:47:54 +01:00
Fabian Homborg
c75ecf9b03 webconfig: Allow setting a variable to empty 2021-12-13 21:47:54 +01:00
Aaron Gyes
84f5e9db20
Update create_manpage_completions.py 2021-12-13 04:33:26 -08:00
Emily Grace Seville
e25b719b26
__fish_tokenizer_state: replace "str" with "state" (#8550)
Bug introduced 4c1173f
2021-12-13 02:42:16 -08:00
Aaron Gyes
cb10f34f2e web_config js: lots of undeclared local variables 2021-12-12 12:32:32 -08:00
Aaron Gyes
ba7d51503e deroff.py: unneccessarry pass, unreachable code 2021-12-12 10:45:50 -08:00
Aaron Gyes
e98fff5883 completion generator: globals at module-level are redundant
also add shebang.
2021-12-12 10:45:50 -08:00
Aaron Gyes
8e61255a04 LGTM report: for has redundant else, output is always overwrtitten
introduced by 2aec6e5814
2021-12-12 10:45:50 -08:00
Aaron Gyes
ff1aea3d96 unnecessary pass statement 2021-12-12 10:45:50 -08:00
Ilan Cosman
521eebef7b
Speed up, fix fish_status_to_signal (#8530)
* Speed up fish_status_to_signal

* Use generated kill signals, not hardcoded
2021-12-11 13:54:11 -08:00
Andrey Mishchenko
3b7994df52 Add completions for nodeenv v1.6.0 2021-12-11 10:25:07 +01:00
Andrey Mishchenko
bb1955ccf9 Remove delete-or-exit function, which has a C++ implementation 2021-12-11 10:19:18 +01:00
Andrey Mishchenko
fb73a4b2e2 Implement nextd-or-forward-word and prevd-or-backward-word in C++ 2021-12-11 10:19:18 +01:00
EmilySeville7cfg
4dc685db6b Completions for builtin argparse
Closes #8434
2021-12-05 08:33:36 +01:00
thibault
ceade1629d builtin commandline: add option to determine if pager is fully disclosed
Use the remaining_to_disclose count to determine if all completions
are shown (allows consistent behavior between short and long completion
lists).

Closes #8485
2021-12-04 22:43:39 +01:00
Kid
bacd47f35f Add completion for Starship 2021-12-04 10:38:14 +01:00
Andrey Mishchenko
e79617f4b7 Add documentation for prompt_hostname 2021-12-04 10:37:49 +01:00
Emily Grace Seville
04de5b1fec
/define option for pabcnetcclear completion (#8526)
* Add /define option

* Fix PascalABC.NET version
2021-12-04 10:32:40 +01:00
Alexander Sieg
7d34908baa Complete cargo subcommands without description
Cargo subcommand extensions don't provide a description in `cargo --list`,
the regex used to filter this list ignored lines without a description.
This change fixes that.
2021-12-04 10:31:11 +01:00
Kid
75d16c13ea Use --almost-all in la function 2021-12-02 02:22:40 -08:00
Fabian Homborg
29fa8b776c themes/coolbeans: Make quotes less red
This was awkward to tell from the error color, which we want to keep red.
2021-11-28 12:50:00 +01:00
Fabian Homborg
2a1d59107f prompts/disco: Remove superfluous space from git prompt 2021-11-28 12:39:22 +01:00
Aaron Gyes
605c048fc7 add dscacheutil completions
this is the thing you use on macos to reset the DNS cache.
2021-11-27 15:23:12 -08:00
Collin Styles
4a3e55f69c Don't escape tildes that come from custom completions
A completion entry like «complete -a '\\~'» results in completions
that insert \~ into the command line.  However we usually want to
insert ~, but there is no way to do that.

There are a couple of longstanding issues about completion escaping
[1].  Until we fix those in a general way, fix the common case by
never escaping tildes when applying custom completions to the command
line. This is a hack but will probably work out fine because we don't
expect literal tildes in arguments.

The tilde is included in completions for cdh, or
__fish_complete_suffix, which simply forwards results from "complete
-C". Revert a workaround to cdh that expanded ~, because we can now
render that without escaping.

Closes #4570, #8441

[ja: tweak patch and commit message]

[1]: https://github.com/fish-shell/fish-shell/pull/8441#discussion_r748803338
2021-11-27 17:05:46 +01:00
Fabian Homborg
772427d788 Coolbeans theme: Pick an option color
We should do this more
2021-11-27 13:36:22 +01:00
Emily Grace Seville
d7c62fa7d1
pabcnetcclear command completion update (#8480)
* Rename pabcnetcclear complete

* Code clean-up

* Debug values support

* Change /Debug description

* Standardize help

* Use single quotes for --arguments
2021-11-27 11:06:08 +01:00
Fabian Homborg
5a71d02d32 Webconfig: Don't outright abort if curses can't be imported
We only need the curses module to look up sgr0, bold and underline
sequences.

Since those are going to be the xterm versions 90% of the time, we can
simply use those if this fails.

Fixes #8487.
2021-11-27 09:54:08 +01:00
EmilySeville7cfg
6f7b80e5b4 Use single quotes where possible 2021-11-26 17:42:34 -08:00
EmilySeville7cfg
4a696c1cc9 color command completion 2021-11-26 17:42:34 -08:00
Ilan Cosman
30400f3ced Use test command instead of bracket command 2021-11-26 16:55:50 -08:00
Kid
d28ddb9dc8 Call deno for completions 2021-11-26 16:16:55 -08:00
Emily Grace Seville
8a3b5ca007
Add findstr completion (#8481)
* Add findstr completion

* Standardize completion

* Show completion only on Windows

* Use single quotes where possible

* Remove quotes where possible

* Remove OS check

* Use single quotes for --arguments
2021-11-26 19:30:43 +01:00
Emily Grace Seville
0697e09f14
Fix --shell option for adduser (#8479)
* Fix --shell option

* Fix

* Replace sed with string match

* Change regex pattern
2021-11-26 19:27:58 +01:00
Emily Grace Seville
f87395f5e9
fish_opt completion (#8433)
* Basic fish_opt completion

* Condition for -o and -r fish_opt options

* Change -g to --local

* Enhance readability

* Add  --require-parameter

* Add --no-files for -s|-l options
2021-11-26 19:26:35 +01:00
Fabian Homborg
5ecdcebf8d Fix help thinking some docs are commands
This looked at __fish_print_commands, which goes via our man pages to
find the commands (it shouldn't, buuut), and exludes a hard-coded list
of pages.

So we do two thigns:

1. We add the other doc pages to the list
2. We check commands *later* - if we listed something explicitly it
should be used
2021-11-25 21:25:46 +01:00
Fabian Homborg
c71a2e573f Fix __fish_seen_argument
Fixes #8478
2021-11-23 18:12:51 +01:00
Ilan Cosman
566a673e4f Run fish_indent on all non-test .fish files 2021-11-23 09:49:45 +01:00
Johannes Altmanninger
37f385b193 completions/npm: offer package completions for "npm add" and "npm i"
Closes #8472
2021-11-23 01:13:27 +01:00
EmilySeville7cfg
7f86794881 __fish_seen_argument update:
- -p option use
- quoting simplify
- description add
2021-11-22 19:00:44 +01:00
Fabian Homborg
c6caa06dbe Don't use removed complete options
This was "--authoritative" (and unauthoritative). It was meant to make
fish mark everything that couldn't be generated via the completions as
an error, it was removed years ago and has been a no-op since then.
2021-11-18 19:28:57 +01:00
exploide
3a56c97087 slightly improved ansible-galaxy completions 2021-11-18 10:13:25 -08:00
Kid
1e84164e4e Skip leading command in __fish_man_page 2021-11-17 12:50:57 -08:00
Ian Chamberlain
3773baf1f3 Use cargo run --example to get list of examples
This behavior matches the way completions are found for `cargo run`,
`cargo test`, etc., and is more robust and correct compared to looking
at filenames.
2021-11-16 07:15:08 +01:00
Fabian Homborg
c16e30931b Fix abbr return status
This was supposed to act like `type -q` or `command -q`, in that it
returns 0 if at least 1 exists.

But because it used the wrong variable it didn't.

Fixes #8431.
2021-11-11 16:46:23 +01:00
Daniel Eklöf
20a1bf289f Recognize all foot terminfo variants when sending OSC-7 (PWD) 2021-11-08 21:14:12 +01:00
Daniel Eklöf
bfedb3608f fish_vi_cursor: add support for alternative foot terminfos
Foot has several terminfos:

* foot - the default one
* foot-direct - 24-bit color terminfo, similar to xterm-direct (used by e.g. emacs)
* foot-extra - alternative to the ncurses provided terminfo, with a couple of extra, non-standard
capabilities
* foot-extra-direct - 24-bit color version of the above

There may also be other distro-custom terminfo names (serving the same purpose as foot-extra*)
2021-11-08 21:14:12 +01:00
Fabian Homborg
c5530421f7 themes: Add fish_color_keyword
Same as $fish_color_command for now.

This makes switching from a theme with one to a theme without nicer.
2021-11-08 19:06:01 +01:00
Fabian Homborg
b96c92a7f7 fish_config: Erase global theme variables if saving 2021-11-08 17:47:49 +01:00
Fabian Homborg
8596d7e344 Themes: Add $fish_color_option
Set it to $fish_color_param for now.
2021-11-08 17:41:34 +01:00
Fabian Homborg
f724541c0a Fix setting colors via webconfig
Fixes #8419.
2021-11-08 17:38:05 +01:00
Fabian Homborg
12117cfe3d fish_vi_cursor: Support foot
Fixes #8391
2021-11-08 17:23:35 +01:00
Emily Seville
ee546a9f03 Create pabcnet_clear.fish 2021-11-08 17:20:27 +01:00
Emily Seville
f75cfb1796 elvish completions 2021-11-08 17:19:55 +01:00
Emily Seville
2c4bbe51cf --version option value add: 2021-11-08 17:19:30 +01:00
Emily Seville
fb9bc2b396 Runtime option support for mono command 2021-11-08 17:19:30 +01:00
Emily Seville
795716613b Basic mono command complitions:
- help/version options
- development options
2021-11-08 17:19:30 +01:00
Emily Seville
868a50bd99 Descriptions simplified for wineboot completions 2021-11-08 16:02:52 +01:00
Emily Seville
f19079aff6 Update winemaker.fish 2021-11-08 16:02:52 +01:00
Emily Seville
e38eebcb11 wine -> wineboot replace in wineboot.fish 2021-11-08 16:02:52 +01:00
Emily Seville
13afc8ae3a winemaker completions 2021-11-08 16:02:52 +01:00
Emily Seville
8029b64c69 wineboot completions 2021-11-08 16:02:52 +01:00
Emily Seville
491551b406 "wine" command completions 2021-11-08 16:02:52 +01:00
exploide
dc3cf14bac completions ip: added more link types 2021-11-07 07:09:54 +01:00
Jenn Wheeler
5b5cee5185 vmctl completion function call needs to be quoted 2021-11-06 18:38:53 +01:00
Aaron Gyes
f910133c82 Add kmutil ArgumentParser completions
This is another one like Shortcuts.
2021-11-04 19:54:44 -07:00
Aaron Gyes
e0b67ed466 integrate apple's shortcuts(1) completions
Shipping with Monterey, the new shortcuts.app has a CLI companion
that can output fish completions.
2021-11-04 19:45:36 -07:00
Johannes Altmanninger
a8956d955f Rename the "none" theme to "None"
Most themes use title case, as do the (change)log entries for this
theme.
2021-11-04 18:41:29 +01:00
Johannes Altmanninger
558041f6e1 None theme: Use reverse video for selected pager entry
Otherwise, with a light-theme, the selected entry uses black text with
"bright black" background, which can be low contrast thus hard to read.

The description background is different, maybe we can fix that later.

See #8376
2021-11-04 18:41:29 +01:00
Fabian Homborg
9e86ffe3bc __fish_print_help: Fix unicode characters
This is nroff/groff being broken. It turns "→" into "â". This is even if we select `-Tutf8` and friends.

So, if mandoc exists, we prefer that, and otherwise, run preconv on
the file first (if it exists).

Really, what we would need to to is tell nroff to pass `-KUTF-8` to
groff, but that doesn't appear to be possible.
2021-11-04 15:15:20 +01:00
Aaron Gyes
d3678c46f2 Revert "Add a function for getting a quick hash/checksum"
This reverts commit 6858abac04.

This was unintentional
2021-11-03 22:55:23 -07:00
Aaron Gyes
fefb913857 Update tests for changed error output 2021-11-03 22:54:55 -07:00
Aaron Gyes
710639f5d6 builtins: work on error messages
- Introduce BUILTIN_ERR_COMBO2_EXCLUSIVE
- Distill generally more terse, unambiguous error descriptions.
  Remember English is not everyone's language.
- Do not capitalize sentence fragments
- Use the modality where problem input is in a %s: prefix, then
  is explained.
- Do not address the user (the "You cannot do ..." kraderism)
- Spell out 'arguments' rather than 'args' for consistency
- Mention 'function' as a scope
2021-11-03 22:54:55 -07:00
Aaron Gyes
6858abac04 Add a function for getting a quick hash/checksum
16 bits ought to be enough for anything
2021-11-03 22:54:55 -07:00
Fabian Homborg
7993987b23 Use cksum in the disco prompt
It's posix, and apparently faster on slow systems. I literally can't
see a measurable difference on mine.
2021-11-03 17:52:44 +01:00
Fabian Homborg
d41b4639f7 Also turn off $fish_color_option
(technically introduced after this)
2021-11-02 21:40:56 +01:00
Fabian Homborg
78e87fe881 Add "None" theme
This basically disables syntax highlighting. That doesn't mean we use
absolutely no colors - the search match, suggestion, selection and the
pager have coloring, but only reverse or brblack.

The idea is that this disables anything that tells you about
the *syntax*, but it still tells you about the state of the
commandline. If we didn't highlight the selection it would be entirely
invisible, and if we didn't highlight the suggestion you would have no
idea where it begins.

So this basically brings colors on-par with bash, where the search
match is colored (in reverse) and suggestions aren't a thing.

An alternative is to add a $fish_highlighting_enabled variable like
the one for suggestions. That's still possible, but would require some
internal changes to avoid coloring some things with $fish_color_normal
and other things with the normal terminal color.

One thing this also does not do is set the git prompt colors. These
are currently disallowed from being set in theme files because they
start with `__fish` instead of just `fish`. We should probably rename
them.
2021-11-02 21:40:56 +01:00
Kevin F. Konrad
788692f1e5
add istioctl completions (#8343)
This program uses the Cobra framework for argument parsing and completion generation.
Just source the completions supplied by upstream.
This works around "go install" not being able to install completions files (only binaries).
2021-10-31 13:10:11 +01:00
exploide
1db25c9b31 updated systemd-analyze compltions for systemd 248 2021-10-28 16:12:31 +02:00
Fabian Homborg
4b46717a91 docs: Move configuration section to language
Instead leave a simple "use config.fish" bit in-place.

Also some minor rewording.
2021-10-23 17:13:36 +02:00
Fabian Homborg
763c5deb39 Teach help about commands.html 2021-10-23 13:47:01 +02:00
take
3ae1842fbe
Add clasp completion (#8373)
* Add clasp completion

* Update CHANGELOG.rst
2021-10-22 23:23:22 +02:00
Jason Nader
95dbef1432 Update dmesg completions 2021-10-22 23:22:26 +02:00
百地 希留耶
be9b8829d0
Add completions for wslpath (#8364)
* add completions for `wslpath`

* add changelog entry for `wslpath` completion
2021-10-22 23:22:02 +02:00
LetMeByte
af7704ef06
Fix st issue with shift+tab (#8354) 2021-10-22 23:21:25 +02:00
Aaron Gyes
f817dc7a76 fixup or/and typo 2021-10-22 12:55:43 -07:00
Aaron Gyes
374d580474 Combine 3 git config forks into one
fish_git_prompt duration improved from 76ms to 45ms here.
2021-10-22 12:45:39 -07:00
Aaron Gyes
46278d7137 remove for loops from git prompt event handlers 2021-10-22 09:05:18 -07:00
Fabian Homborg
6e491ad457 abbr: add missing options
Fixes #8367.
2021-10-19 17:45:18 +02:00