Commit graph

4346 commits

Author SHA1 Message Date
Thom Chiovoloni
a770ff144e Make more of the functions in share/functions print error messages to stderr 2022-04-04 18:26:14 +02:00
Fabian Homborg
84bd1715d8 history: Add missing "--" for delete
Fixes #8853
2022-04-03 21:02:15 +02:00
Johannes Altmanninger
d87bbf9433 completions/status: fix wrong completion for test-feature
Reported in
5f94dfd094/.config/fish/README/bug.md (wrong-tab-completion-for-status-test-feature)
2022-04-03 15:54:08 +02:00
Johannes Altmanninger
ff72e3f154 completions/git: speed up loading git.fish when "git-foo" completions already exists
git.fish loads git-foo.fish completions.
As reported in #8831, this can be slow when the user has run something like

    complete git-foo -w 'git diff'

because git.fish runs 'complete -C "git-autofixup "' at load time.
Commit 09161761c (Complete custom "git-foo" commands from "git foo",
2021-01-24) did that to avoid adding filename completions for "git foo".
Drop that check.

This means that users who don't want filename completion for "git foo",
need to define at least one custom completion for "git-foo", like

    complete git-foo -f
2022-04-02 12:52:57 +02:00
Aaron Gyes
cd23fdac2e killall completions: fix '-procname' procs, -help, -t description 2022-03-31 20:28:25 -07:00
Johannes Altmanninger
bb055c7c81 completions/code: also complete paths for --install--extension
The docs state:
code --install-extension <ext-id | path> Installs or updates an extension. The
argument is either an extension id or a path to a VSIX.
2022-03-31 17:25:15 +02:00
Fabian Homborg
f13979bfbb Move executable-check to C++
This was already apparently supposed to work, but didn't because we
just overrode errno again.

This now means that, if a correctly named candidate exists, we don't
start the command-not-found handler.

See #8804
2022-03-31 15:16:01 +02:00
Kid
90d52ee669
Complete /dev/fd in isatty (#8840)
* Complete `/dev/fd` in `isatty`

* Check `/dev/fd` existence first
2022-03-30 18:29:59 +02:00
Kid
820f8bc1af Update a few git completions 2022-03-30 18:29:21 +02:00
Fabian Homborg
f9f0ad1ef7 completions/git: Check alias definitions for an option
This allows e.g. defining

    	re = restore --staged

and then getting completions for `restore --staged`, not just `restore`.

Fixes #8843
2022-03-30 18:25:00 +02:00
Fabian Homborg
51b663787f completions/git: Complete git restore -S
This used `contains`. Let's just use `__fish_contains_opt` and pass
the short option as well.

See #8843.
2022-03-30 16:42:19 +02:00
Aaron Gyes
de03322073 Update date completions for newer BSDs
-d has been removed in FreeBSD 13 & monterey
-t has also been removed from date(1)
-n has been "Obsolete flag, accepted and ignored for compatibility",
   for a while, leave it out.
-R added for RFC 2822
-I added for ISO 8601

Some description changes
2022-03-28 09:26:00 -07:00
David Adam
fa2450db30 vared: avoid using local variables
The tmp and prompt variables collide with variables used as arguments.
Just avoid them entirely, at the cost of making the internals of the
functions somewhat more complicated.

Closes #8836.
2022-03-27 23:52:49 +08:00
Aaron Gyes
b83d8dc8c0 angular: remove sourceMappingURL comments
We don't ship source maps, so just remove these
comments to prevent the annoying 404s the server
will print out when using `fish_config`.
2022-03-26 17:14:09 -07:00
Fabian Homborg
62807c2788 fish_config: Let tabs wrap
Otherwise they would scroll off-screen for narrow windows. This was intentional.
2022-03-26 22:54:17 +01:00
Aaron Gyes
be4fa1dc1a fish_config: improve tab display
Use a heavier weight slightly larger font, remove the borders, and
prevent wrapping like:

    Binding
       s
2022-03-26 14:46:46 -07:00
Fabian Homborg
25e02ea07f fish_config: Use the same body fonts as the doc theme
Otherwise this was 100% monospace.

But since we have a specific list of fonts that we have checked, let's
use the same list instead of just adding "Helvetica" again.
2022-03-26 21:57:11 +01:00
Fabian Homborg
ff6a12e9c6 Revert "fish_config: use system-ui/sans serif for non-shell/code text"
Like the comment says: List explained in pydoctheme.css.

This also removed a number of other fonts.

This reverts commit f3cf32a085.
2022-03-26 21:53:23 +01:00
Aaron Gyes
f3cf32a085 fish_config: use system-ui/sans serif for non-shell/code text
This is nicer. It was actually using monospace fonts across
the board before.

Tweak tab rendering.
2022-03-26 13:48:23 -07:00
Aaron Gyes
776fc0b7f3 fish_config: HTML5 doctype 2022-03-26 13:27:22 -07:00
Aaron Gyes
492f9bb046 web config: buttons are <buttons> instead of <span>s.
This is exactly what <button> is for, and we can remove
some CSS.
2022-03-26 13:27:22 -07:00
Fabian Homborg
b6f47f76f0 completions/nmcli: Exit if networkmanager isn't running
These printed an error on load if networkmanager isn't running.

Since at that point it's not useful to complete anything, just try the
first call and if that fails exit.
2022-03-25 16:13:43 +01:00
Fabian Homborg
4c40283d00 completions/csharp: Fix syntax error 2022-03-25 16:10:21 +01:00
Fabian Homborg
2c702de52c Put funcsave long option back
This reverts ed8c78c0ea, emphatically.

Fixes #8830
2022-03-24 20:11:39 +01:00
Kid
4ef6a41cc4 Rename fzf --phony completion to --disabled 2022-03-24 11:03:53 +01:00
David Adam
8c4c526698 ulimit: add new limits from FreeBSD/NetBSD
Short option names are taken from sh for those platforms where possible.
2022-03-24 10:23:04 +08:00
David Adam
2c2b87af07 ulimit: add new limits from Linux
Short options are taken from prlimit(1) where appropriate.

Closes #8786.
2022-03-24 10:23:04 +08:00
Fabian Homborg
edbd3baa59 fish_config: Set colors that aren't set in the theme to empty
This allows keeping it to the fallback value, making us independent
from the theme that was set before.
2022-03-20 17:04:28 +01:00
Fabian Homborg
751c7cbf9c fish_config CLI: Use color fallbacks 2022-03-20 17:04:28 +01:00
pagedown
1f51274353 Add completion for rclone 2022-03-20 16:33:13 +01:00
Matti Viljanen
5994e44877 Fix launching fish_config on SailfishOS 2022-03-18 15:56:22 +01:00
Fabian Homborg
666032abbd Translate command-not-found message
I have no idea why this function is defined twice.
2022-03-17 18:19:03 +01:00
pagedown
47294f4d29 Add kitty to __update_cwd_osc 2022-03-17 18:17:42 +01:00
Evan Benn
f7faf0fcf7 Reorder git checkout completions
Multiple complete -k -a arguments are ordered last first. Reorder the
completions to list branches first, then tags and then finally commits.
2022-03-17 18:15:44 +01:00
Fabian Homborg
fb283cfe4a Move $__fish_initialized to config_interactive
This is no longer used in share/config.fish, and it's quite cheesy.

The only thing we use it for is defaulting the colorscheme.
2022-03-17 18:15:11 +01:00
Fabian Homborg
49c16cc9a6 Stop migrating old abbrs
This tried migrating old abbreviations *twice* - once from the 2.3
scheme to the 2.4 one, and once from that to the 3.0 scheme.

Since this is purely for upgrading from fishes < 3.0, and basically
untested, let's remove it.

If anyone does that upgrade, they'll simply have to reexecute the abbrs.
2022-03-17 18:15:11 +01:00
Fabian Homborg
71cfd25c1d Command-not-found: Warn if a file exists but isn't executable
This simply adds a nice error so you can better see if your command
isn't available because it's not executable.

Fixes #8804.
2022-03-17 18:06:36 +01:00
AJ
fd84e07320 completions: fix long tmutil.fish descriptions #6981
Reduce `tmutil.fish: tmutil -n __fish_use_subcommand -a localsnapshot -d` to 66 characters.
2022-03-16 20:29:00 +01:00
AJ
fcfa72e5fc Update mix.fish
Update `mix.fish` autocomplete to shorter description (60 characters). Addresses `mix.fish` Issue #6981
2022-03-16 20:28:27 +01:00
aj
d2225e5ce7 remove heroku-two-factor as it is deprecated per: https://github.com/heroku/heroku-two-factor
update complete $heroku_looking -xa git:clone to make it as short as possible without losing meaning.
2022-03-15 19:19:49 +01:00
Radu Potop
2884b27367
Astronaut prompt theme (#8775)
* Added initial commit for the Starfish prompt theme

* Respect cwd colors

* Corrected typo

* Renamed theme to Astronaut

* Fixed cwd_color for root

* Allow longer dir names, fix variable setting
2022-03-15 17:06:00 +01:00
Missu
30dcd18afb
Add completion for tuned-adm (#8760)
* Add completion for `tuned-adm`

This is part of `tuned` package

* Update tuned-adm.fish
2022-03-15 17:05:06 +01:00
Missu
280727073a
Add completion for brightnessctl (#8758)
* Add completion for `brightnessctl`

* Update brightnessctl.fish
2022-03-15 17:04:31 +01:00
Fabian Homborg
c5a8764db1 Use old-school "()" command substitution in fish_title
Because we reload changed function files, a common issue on upgrading
to 3.4.0 is that fish_title causes errors.

So we simply use the oldschool syntax.
2022-03-14 18:15:06 +01:00
joao-vitor-sr
4ae4ea0169
New -n flag for string join. (#8774)
* New -n flag for string join command.

This is an argument that excludes empty result items. Fixes #8351

* New documentation for string-join.

The new argument --no-empty was added at string-join manpage.

* New completions for the new -n flag for string join.

* Remove the documentation of the new -n flag of string join0

The reason to remove this new argument in the join0 is that this flag basically doesn't make any difference in the join0.

* Refactor the validation for the string join.

The string join command was using the length of the argument, this commit changes the validation to use the empty function.

* Revert #4b56ab452

The reason for the revert is thath the build broke on the ubuntu in the Github actions.

* Revert #e72e239a1

The reason the compilation on GitHub broke is that the test was weird, it didn't even run it, Common CI systems are typically very very resource-constrained.

* Resolve conflicts in the string-join.rst.

* Resolve conflicts in the "string-join.rst".

commit #1242d0fd7 not fixed all conflicts.
2022-03-13 11:47:33 +01:00
Fabian Homborg
3941ded193
completions/rustup: Remove errant complete -c
This was an oversight in 7fb3880b96, and would have spewed the existing rustup completions if this file was sourced twice (which probably won't happen given autoloading, to be fair).
2022-03-10 15:14:16 +01:00
Fabian Homborg
2d545c651d fish_title: Make directory shortening consistent
I have no idea why this kept one component in the one case and none in
the other.

Because we already aggressively shorten the command, we can keep the directory.
2022-03-06 13:15:03 +01:00
Fabian Homborg
7b01b4d308 fish_title: Show hostname if connected via ssh
See #8641
2022-03-06 13:14:22 +01:00
Missu
ff882d8326 Add asd completion
This is `anything-sync-daemon`
2022-03-05 20:49:43 +01:00
Missu
1da25fd916
Add completion for rc-status (#8757)
`rc-status` is part of OpenRC
2022-03-05 20:49:21 +01:00