Commit Graph

4043 Commits

Author SHA1 Message Date
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
Erik Serrander
049104e8df Adds sub-command clear-session to history command.
Issue #5791
This clears all history for the current session. Documentation and
autocompletion for the new subcommand is added.
2021-10-17 19:27:46 -07:00
Aaron Gyes
4cfe095367 update angular-route and angular-sanitize to 1.8.2 as well
URLs for source and SHAsums because the minified js is inscrutible:

https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-sanitize.min.js
https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-route.min.js

32197fa25de2415816c22fd4d512fef407e2df33  angular-route.min.js
8a6e6f02cc69e8c5bfface0d935dc6f65c9d8a05  angular-sanitize.min.js
2021-10-16 22:53:19 -07:00
Aaron Gyes
901d1f1556 fixup last commit 2021-10-16 22:44:08 -07:00
Aaron Gyes
2a0747b9f1 Update AngularJS to 1.8.2 and use Google's minified version
(it's like 170KB instead of 1.3MB)

https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js
32e24fc5f40120fe30ca097235d6c5988f84c927  angular.min.js
2021-10-16 22:41:19 -07:00
Johannes Altmanninger
7ccf001bc3 completions/git: simplify description of "git diff -R"
This is simpler, plus the old description is invalid when multiple
revisions are given.
2021-10-14 20:10:12 +02:00
zeertzjq
a4a48b38f7
Display local branches before unique remote branches in git completion (#8338)
Usually local branches have remote branches with the same name, and in
completion they are currently overshadowed by unique remote branches, making
local branches hard to find. Define local branch completion after unique
remote branch completion to show local branches before unique remote branches.
2021-10-14 19:36:14 +02:00
Fabian
72f55ab206
Fix ant completion (#8344)
If $xdg_chache_home is empty, this is not a valid fish expression:

    [ \( -z \) -o \( ! -d \) ]

and results into an error.

While at it, also use $XDG_CACHE_HOME if that directory does not exist.
This seems better than falling back to $HOME/.cache, which the user has
explicitly overridden via $XDG_CACHE_HOME.
2021-10-14 19:25:23 +02:00
LetMeByte
6606dfbeb5 Fix issue with delete-key in st
In 'simple terminal' the delete key prints \e[P by default, which is
related to the different approach the authors of st are taking on the
matter of shell configuration. The main problem is the malfunction of
the delete key, so we have to use a workaround like this.
2021-10-14 22:14:39 +08:00
Aaron Gyes
7122209f25 Remove old OS X stuff from keybindings
We don't support older than 10.10 anymore.

fish_key_reader reports the hardcoded bind we had for Mavericks
is just -k sdc.
2021-10-06 19:29:13 -07:00
takeokunn
d557445875 Add roswell completion 2021-10-06 14:51:26 -07:00
takeokunn
08b75d2358 Add sbcl completion 2021-10-06 14:51:26 -07:00
Johannes Altmanninger
cb5a3fd9a1 completions/man: offer file completions when appropriate
Suggest files to "man -l", but only if the "-l" option is supported
(so not on BSD). Technically we should accept multiple files but this
seems good enough.

Also suggest files when the token-at-cursor contains a slash, because
man will treat arguments as file paths if they contain a /.
2021-10-05 21:53:17 +02:00
Anselm Schüler
475a2afc40
fish_prompt: clarify comment about carried-over status (#8335) 2021-10-05 21:01:13 +02:00
zaleoth
df9f01dd50
completions/ip: Use command (#8334)
Add "command" directive in front of ip commands to prevent bug from a buggy aliased "ip"
2021-10-05 20:47:49 +02:00
Johannes Altmanninger
f674c4b010 completions/git: treat more T files as modified
git-status --porcelain prints status letter T when a file changed type
between either regular file, symlink or submodule.  It can occur in
exactly the same cases as M (modified), so extend the fix for #8311
accordingly.

For submodules, our completions are probably not always correct,
hopefully those cases are rare.
2021-10-04 21:45:14 +02:00
Noorhteen Raja NJ
3e345dccb9 Update ldapsearch.fish 2021-09-30 12:23:39 -07:00
Noorhteen Raja NJ
9b9a637e5c Update duply.fish 2021-09-30 12:21:20 -07:00
Jony
7df5efe317 completions/xbps-query: add missing -p completions 2021-09-30 12:13:42 -07:00
Aaron Gyes
35bd06a13e fish_config: adjust output
Do not show an error on `fish_config prompt save` after removing a
`fish_right_prompt`
2021-09-29 03:15:37 -07:00
Aaron Gyes
f3b950157d Remove special case for fish_right_prompt in config.fish 2021-09-29 03:12:39 -07:00
Aaron Gyes
ed8c78c0ea Update docs, completions for funcsave
Remove long opt for -q, funcsave does not have so many options that
it's any help.
2021-09-29 03:08:10 -07:00
Aaron Gyes
a5978eade4 funcsave: add missing newlines 2021-09-28 22:22:21 -07:00
Aaron Gyes
3a402b19b3 funcsave: delete files for non-existant functions, output actions unless -q
This allows for:

$ functions -e somefunc
$ funcsave somefunc

to work.
2021-09-28 22:01:07 -07:00
Fabian Homborg
69074c1591 fish_config: Remove right prompt in choose and save
If the new theme no longer has any.

Fixes #8314.
2021-09-26 15:34:04 +02:00
takeokunn
d2ca6ed564 Add dart completion 2021-09-25 10:36:11 -07:00
Fabian Homborg
6c8b0a1245 Reapply -F
This was forgotten in a40a35cc52.

Sorry!
2021-09-24 18:25:27 +02:00
Fabian Homborg
113e91ab9a Use a local variable
Otherwise this is annoying on upgrade
2021-09-24 18:17:49 +02:00
Fabian Homborg
5f5bd03911 functions/ls: Work around Terminal.app not setting $COLORTERM
Fixes #8309
2021-09-24 18:15:48 +02:00
Fabian Homborg
07e512ecd8 completions/git: Treat T files same as modified
This is weirdly undocumented (as of git 2.33.0), but `git status` prints a "T" state if
the file has its "T"ype changed, e.g. from a regular file to a symlink.

For our purposes that's just another kind of modification.

Fixes #8311.
2021-09-23 15:23:43 +02:00
Max Nordlund
85ea9bf781
Hide whatis database building from the user (#8310)
* Hide whatis database building from the user

It's really an internal detail, but shows up in prompts that display how many
background jobs are running.

By disowning it keeps running but won't show up in `jobs` or get killed if the user
exits the shell.

* Update __fish_apropos.fish
2021-09-23 10:59:44 +02:00
Pascal Huber
3099d7bdeb Fix man completion for BSD's mandoc 2021-09-21 12:34:21 +02:00
Lia Lenckowski
1d7036d19f Add completions for cpupower 2021-09-20 17:46:15 +02:00
Kid
0d8ffa8f87 Make less version check compatible with older Fish 2021-09-17 17:32:03 +02:00