Commit Graph

3937 Commits

Author SHA1 Message Date
Yaksh Bariya
2e34852ded
Add completions for git mailinfo 2021-07-22 13:25:12 +05:30
Yaksh Bariya
3f5f722e7a
Add completions for git stripspace 2021-07-22 13:25:11 +05:30
Yaksh Bariya
f976144b27
Add completions for git notes 2021-07-22 13:25:11 +05:30
Yaksh Bariya
1344b638d2
Add completions for git maintenance 2021-07-22 13:25:11 +05:30
Yaksh Bariya
55886943c1
Add missing completions for git daemon 2021-07-22 13:25:06 +05:30
Kevin F. Konrad
869c42d72a
Add completion for azure cli (az) (#8141)
* add completion for azure cli (az)

* alter az.fish to match faho's requests

Co-authored-by: Kevin Konrad <kevin.konrad@unicepta.com>
2021-07-21 17:57:59 +02:00
Fabian Homborg
405a03bfae fish_config: Pass filenames as arguments
This injected filenames into fish script, which could inject things
that looked like fish script.

E.g. create a file called `~/.config/fish/themes/"; rm -rf ~/*"`.

Note that the prompts are all shipped by us, but the themes can
technically be added by the user, and they might not be dilligent in
what filenames they allow.
2021-07-16 17:30:35 +02:00
Fabian Homborg
900e4a232e fish_config: Error for choose/save with too many/few args 2021-07-14 19:48:33 +02:00
Fabian Homborg
768afadcad Also read home theme directory in webconfig 2021-07-14 18:56:19 +02:00
Fabian Homborg
8223e6f23e fish_config: Add CLI-based theme selector
`fish_config theme`:

- `list` to list all available themes (files in the two theme
directories - either the web_config/themes one or
~/.config/fish/themes!)
- `show` to show select (or all) themes right in the terminal - this
starts another fish that reads the theme file and prints the sample
text, manually colored
- `choose` to load a theme *now*, setting the variables globally
- `save` to load a theme and save the variables universally
- `dump` to write the current theme in .theme format (to stdout)
- `demo` to display the current theme
2021-07-14 18:56:19 +02:00
Fabian Homborg
fd35dc2aa1 completions/git: Describe more "log" options
And do this by reusing other entries - mostly range-diff's.
2021-07-14 18:24:08 +02:00
Fabian Homborg
ee3a1f24c3 completions/gpg: Don't require an email address
Fixes #8079
2021-07-14 17:30:51 +02:00
Fabian Homborg
e013422143 Deduplicate $fish_user_paths automatically
In the variable handler, we just go through the entire thing and keep
every element once.

If there's a duplicate, we set it again, which calls the handler
again.

This takes a bit of time, to be paid on each startup. On my system,
with 100 already deduplicated elements, that's about 4ms (compared to
~17ms for adding them to $PATH).

It's also semantically more complicated - now this variable
specifically is deduplicated? Do we just want "unique" variables that
can't have duplicates?

However: This entirely removes the pathological case of appending to
$fish_user_paths in config.fish (which should be an FAQ entry!), and the implementation is quite simple.
2021-07-14 16:37:30 +02:00
Johannes Altmanninger
6c22c0e30d completions/git: do not attempt to complete rev:file in option words
Fixes #8139
2021-07-14 00:01:20 +02:00
Johannes Altmanninger
e50805646e completions/git: define function before use 2021-07-12 23:42:01 +02:00
Siavash Askari Nasr
ab201f7590 Add completion for Rakudo
[Rakudo](https://rakudo.org/) is an implementation of the
[Raku](https://raku.org/) programming language.
2021-07-12 21:33:36 +02:00
Raman Gupta
ed7a64ea77 Replicate upstream git logic for alias commands 2021-07-12 16:39:44 +02:00
Fabian Homborg
c5d4f26b09
Merge PR #8127: fish_config: Read colorschemes from .theme files
fish_config: Read colorschemes from .theme files
2021-07-11 22:18:46 +02:00
radiantly
55e60eeae2 Add completions for black (#8123) 2021-07-11 14:35:39 +02:00
Fabian Homborg
e021773288 Address review feedback 2021-07-11 11:23:16 +02:00
Fabian Homborg
4ec06f025c Fix fish_config prompt completions
Oops
2021-07-11 10:13:34 +02:00
Siavash Askari Nasr
8d17f81d66 Add zef completion
[zef](https://github.com/ugexe/zef) is a module manager for
[Raku](https://raku.org/) programming language.
2021-07-11 09:26:21 +02:00
YAKSH BARIYA
46ae46b54e
Add initial completion for Angular CLI (#8111)
* Add initial completion for Angular CLI

* Remove completion for `ng completion`

The `ng completion` doesn't exist. The completiond were autogenerated
using a script. See angular/angular-cli#21085

* Use shorter wording

* Fix typos
2021-07-11 09:25:04 +02:00
Fabian Homborg
072d735853 Webconfig: Remove colorschemes from js
This still keeps the Nord and Solarized palettes because we use the
backgrounds in the sample background list.
2021-07-09 20:36:59 +02:00
Fabian Homborg
51a55b25dc Webconfig: Read metadata from themes
This readds the preferred background and url, all read from "# url:"
and "# preferred_background:" comments in the .theme file.
2021-07-09 20:36:59 +02:00
Fabian Homborg
f301639d07 Add metadata to .theme files
Following a "#" comment. Also empty lines, so we have to deal with them.
2021-07-09 20:36:55 +02:00
Fabian Homborg
0e3d7de889 Webconfig: Read colorschemes from .theme files 2021-07-09 19:45:03 +02:00
Fabian Homborg
8091303659 Webconfig: Add colorschemes as ".theme" files
These are simple

var val [val val]

files. Basically the bit in `set -g fish_color_escape 86c1b9` after
the `set -g `. Since we're not going to `source` them, however,
arbitrary code and expansions are unsupported.

Also comments and such don't currently work.

This allows them to be easily readable both from webconfig (next
commit) and the shell (later).
2021-07-09 19:38:59 +02:00
Fabian Homborg
2aec6e5814 Webconfig: Pass colorscheme in one json request
This used to pass each color in a separate url-encoded request, which is
just wasteful.

Also it passed separate parameters for modifiers like bold and
underlined, but never gave them actual values. Instead the color is
passed as one string.

So we just use json, and then iterate over it server-side.
2021-07-09 18:26:51 +02:00
Avindra Goolcharan
32826d3596 Node completion: add sparkplug option
Feature: https://v8.dev/blog/sparkplug
Tested: Node.js v16.4.0
2021-07-08 16:10:34 +02:00
Kid
727934c6b6 Fix duplicate -p flag in fish completion 2021-07-05 19:04:23 +02:00
Kid
1361a5f68c Add missing options for bind 2021-07-03 22:06:48 +02:00
Fabian Homborg
04af336843 vi-mode: Repaint mode after cancelling
Fixes #8103
2021-07-03 21:37:33 +02:00
Johannes Altmanninger
c18f293ae2 completions/git: offer arbitrary commits to "git switch -d"
Fixes #8101
2021-07-03 08:54:12 +02:00
Johannes Altmanninger
9f54c8d88b completions/git: don't offer deleted files to "git diff" unless we have a "--"
Fixes #8090
2021-06-29 23:31:05 +02:00
Johannes Altmanninger
6c460f643c completions/git: don't comlete commits after "git difftool -- " 2021-06-29 23:31:05 +02:00
Luca Weiss
b8e7b6bcb0 completions/git: suggest modified-staged-deleted files
Add those files to the completion of 'add', 'checkout', 'diff', 'difftool', 'restore' and 'stash
push'.
2021-06-29 23:12:06 +02:00
Kid
85a900055d Split history commands in __fish_toggle_comment_commandline 2021-06-23 22:46:09 +02:00
Johannes Altmanninger
7c2dd694e0 Provide functions to toggle commandline prefix/suffix
This introduces two functions to
- toggle a process prefix, used for adding "sudo"
- add a job suffix, used for adding "&| less"

Not sure if they are very useful; we'll see.

Closes #7905
2021-06-23 20:51:20 +02:00
Johannes Altmanninger
caf1bbfc97 __fish_paginate: do not append a semicolon
I almost always use this on the last/only job in a commandline, so
the semicolon is usually not needed.  We have always added it but I
prefer not dropping it: this feels cleaner because it's what you'd
type without the shortcut.
2021-06-23 20:51:20 +02:00
Fabian Homborg
cc54917efa fish_add_path: Explicitly set $PATH as global
Fixes #8082
2021-06-23 20:01:58 +02:00
Wolfgang Müller
4a3df618f2 __fish_list_current_token: Do not use eval
Similarly to b0e3cc4b5 (__fish_complete_suffix: Remove `eval`,
2019-12-28), this use of eval is unsafe and can spew errors if
invoked on an incomplete brace expansion.
2021-06-22 17:44:32 +02:00
Johannes Altmanninger
6c88c7d200 __fish_print_help: remove spurious bold/underline control characters
Commit d15a51897 ("Rationalize $LESS uses") switched a "less" flag
from -r (interpret all control characters)
  to -R (interpret only color codes)

Somehow this changed the output of "fish -c 'command -h'" to include
weird characters:

	DESCRIPTION^O
	command^O forces the shell to execute the program COMMANDNAME^O and ignore any functions or builtins with the same name.

Probably this was the reason why I originally used -r over -R.  Anyway,
-R is safer and it looks like we can just remove the "ul" preprocessing
since "less" will interpret bold/underline just fine.
2021-06-20 20:58:15 +02:00
Johannes Altmanninger
73b13315de completions/dd: re-use built-in file completion for "dd if=the-file"
This allows to complete file arguments even if they contain variables.

Add similar logic for arguments to Maven's -D option.

See https://github.com/fish-shell/fish-shell/issues/5248#issuecomment-857614957
2021-06-19 20:31:46 +02:00
Johannes Altmanninger
48426d6285 Tweak git completion wording (review for #8062) 2021-06-19 10:10:59 +02:00
lelgenio
b8767cc803 completions/sv.fish: create completion for sv, a part of runit. 2021-06-19 08:17:53 +02:00
Collin Styles
a5e665cd81 Add completions for "empty" options to git-commit 2021-06-18 20:49:34 +02:00
Collin Styles
feec10f389 Add completions for different types of git resets 2021-06-18 20:49:34 +02:00
Collin Styles
0abbd2bc2f Add completions for git-revert sequencer subcommands 2021-06-18 20:49:34 +02:00
Collin Styles
15fdfb5afe Add completion for --abbrev-ref option to git-rev-parse 2021-06-18 20:49:34 +02:00