Commit Graph

3949 Commits

Author SHA1 Message Date
Fabian Homborg
7167ba6e08 Work around Terminal.app's awkward alt-left/right sequences
Just do the more involved thing.

Blergh.

Fixes #2330.
2021-07-23 19:38:43 +02:00
Aniruddh Agarwal
0445126c2e Undunder __fish_is_nth_token
We keep __fish_is_nth_token for compatibility and edit the
implementations of __fish_is_nth_token, __fish_is_first_token and
__fish_is_token_n to use fish_is_nth_token
2021-07-23 17:25:50 +02:00
Fabian Homborg
c35ffc58fc
Merge pull request #8134 from thunder-coding/complete-more-git-commands
Add missing completions for some git commands
2021-07-23 08:01:38 +02:00
Yaksh Bariya
e9a16ed7b5
Fix typos 2021-07-23 06:55:07 +05:30
Yaksh Bariya
692c6ae118 Add completions for git-sizer 2021-07-22 19:29:05 +02:00
Fabian Homborg
11da6db009 Cleanup of a comment 2021-07-22 19:19:49 +02:00
Yaksh Bariya
29fc74bc6a
Remove -F supplied to complete
Using `complete -F -c git -n __fish_git_needs_subcommand -a $command -d
$description` causes file completions to be forced on entire git command
which is not a desired result. Morever without the `-F` flag file
completions work just as expected and is useless addition
2021-07-22 17:06:59 +05:30
Yaksh Bariya
6f52c017ba
Resolve all conversations 2021-07-22 13:26:38 +05:30
Yaksh Bariya
54476d583b
Add flag completions for git mv 2021-07-22 13:25:12 +05:30
Yaksh Bariya
9d0d0b81fd
Add completions for git apply 2021-07-22 13:25:12 +05:30
Yaksh Bariya
162c4ac789
Add completions for git mailsplit 2021-07-22 13:25:12 +05:30
Yaksh Bariya
4c5f41531d
Add completions for git am 2021-07-22 13:25:12 +05:30
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