Commit graph

4174 commits

Author SHA1 Message Date
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
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
ridiculousfish
05fdee1be7 Continue passing -X / --no-init for less < v530
The less -F / --quit-if-one-screen option is buggy before v530. To work
around this, pass --no-init less versions older than 530.

The --no-init option was previously passed; it was removed in d15a51897d
for mouse support. Unfortunately it looks like we can't have mouse
support and --quit-if-one-screen on macOS shipped less (version 487).

It's worth fixing this because otherwise history and help is just not
printed on stock macOS.

Relevant is https://unix.stackexchange.com/questions/107315/less-quit-if-one-screen-without-no-init

Fixes #8157.
2021-09-16 18:03:03 -07:00
exploide
f32b887dba added completions for ethtool 2021-09-14 21:44:44 +02:00
Johannes Altmanninger
51a3885d8c funced: avoid interpreting special characters in function name
Commit c3374ffd0 ("Use read --tokenize instead of eval for $BROWSER &
$EDITOR") converted uses of "eval" for environment variables to use the
safer "read -at", which performs word splitting but no other expansion.

funced contained a leftover instance of "eval". Remove it in favor
of using the editor command that was already word-split.
This means that we don't accidentally evaluate the file name.

(Also "set -gx EDITOR=~/my-editor" won't work anymore because the ~
is not expanded anymore but no one has complained about that behavior
in edit_command_buffer.)

Fixes #8289
2021-09-13 19:16:41 +02:00
Victor Diaz
8c09fc7a3a Prepend command to cat
*Problem:*
edit_command_buffer uses `cat` to return the modified content.
If a person has an alias for `cat` to a different command such `bat`** the editing will not be useful anymore since bat decorates the text with frames, line counts, etc

*Solution*
Appending command to cat, fish will ignore the alias and execute the real command according to this https://fishshell.com/docs/current/cmds/command.html

** https://github.com/sharkdp/bat
2021-09-12 22:11:01 +08:00
Kid
139b74d8eb Fix fish_key_reader wrapper check 2021-09-05 21:42:35 +02:00
Fabian Homborg
aa58a54224 Webconfig: Add my own colorscheme
Already added my prompt, might a well.
2021-09-03 17:38:34 +02:00
Fabian Homborg
08690e0303 Webconfig: Use theme's name if available
The "name" here refers to the `# name:` line from the .theme file.
That's a much more descriptive name and allows using simpler filenames.
2021-09-03 17:37:54 +02:00
Fabian Homborg
4194977569 Prompt demo: Only the unmatched quote is an error
The text after is normal quoted text since
822b53c67a.

We might want to find nicer error text.

Fixes #8260.
2021-08-30 17:32:55 +02:00
mtoohey31
25b9568f2a completion: exif (#8246)
Adds completion support for the exif command line tool (upstream:
https://github.com/libexif/exif).
2021-08-29 11:35:08 +02:00
Akatsuki Rui
9022b9bef6 feat(completions/coredumpctl.fish): new complete for systemd 249 2021-08-28 19:36:23 +02:00
Akatsuki Rui
a113b3a755 fix(completions/coredumpctl.fish): missing --arguments 2021-08-28 19:36:23 +02:00
Takumi Kameyama
6bd25ed599
Fix completions/ls.fish (#8249)
* Fix ls.fish: add -l option to GNU ls

* Sort alphabetically and remove --lcontext and --scontext (what are these?) on shared and GNU part.

* Revert --lcontext and --scontext options.
2021-08-24 19:29:32 +02:00
Kid
48e4ce2f6d Add and fix completions for new options 2021-08-23 18:04:11 +02:00
Lars Lenckowski
284b7d8eb0 complete "mpc load" 2021-08-23 18:03:57 +02:00
Fabian Homborg
0e06a53dff help: Add sections directly via the <span id>
This should add all the sections that aren't linked internally,
including "identifiers".

(also give up on the line breaking because it makes it annoying to do
automatically)

Fixes #8245.
2021-08-22 13:14:59 +02:00
Fabian Homborg
fe71e62a68 help: Update sections
This was semi-automated with

```fish
for file in $argv
    set -l varname (string replace -r '.*/(.*).html' '$1' -- $file | string escape --style=var)pages
    set -l sections (string replace -rf '.*class="headerlink" href="#([^"]*)".*' '$1' <$file)

    echo set -l $varname $sections
end
```

(where $argv contains the path to faq, fish_for_bash_users,
interactive, language and tutorial.html)

Building help.fish at compile time would work, but only for users who
build the docs.
2021-08-20 17:40:57 +02:00
Mahmoud Al-Qudsi
d27f477ba6 Fix truncated completions for pkg install <foo>
The same hack that is used for `pkg remove <foo>` is required here, too.
Due to the massive number of results, we use `head -n 250` to prevent
the completion from hanging or the shell from being overencumbered by
too many possibe completions. However, this would only generate matches
for any of the first 250 packages, rather than printing the first 250
packages that match.

[ci skip]
2021-08-18 00:20:08 -05:00
aca
321fd74de0 edit_command_buffer: use "command" to ignore any functions with the same name 2021-08-17 06:24:09 +02:00
David Adam
ff8f26e65a funced: suggest saving functions when an editor is used 2021-08-16 21:45:23 +08:00
David Adam
8dd4c67db1 funcsave: edit the whole file containing a function
Many functions ship in files with helper functions, and it is useful to
edit those too.

Closes #391.
2021-08-16 21:45:22 +08:00
David Adam
52eff27239 funced: don't source or save unmodified files
If funced is just used to inspect a function, there's no need to write
it to storage or to reload it.
2021-08-16 21:44:43 +08:00
David Adam
911269c4a9 funcsave: avoid the edited function's path being a temporary file
As functions know where they are loaded from now, there is no point in
them being marked as loaded from a temporary file that has been removed.
Source the function via a redirect instead.
2021-08-16 21:44:43 +08:00
mtoohey31
703a717660 completion: support --no prefixes for mpv flag options 2021-08-14 10:56:23 +02:00
ridiculousfish
b0b6a585a8 Support Apple_Terminal in fish_vi_cursor
This enables it unconditionally, as tests show that the cursor escapes
are ignored before 10.12.

Fixes #8167
2021-08-10 13:23:08 -07:00
Johannes Altmanninger
7b55c0edb4 completions/git: finish completions for git bisect 2021-08-10 21:01:39 +02:00
Johannes Altmanninger
96e665f9ec __fish_complete_subcommand: (re)move confusing comment 2021-08-10 21:01:39 +02:00
Fabian Homborg
6c1ec98e92 prompt_pwd: full-dirs set to 0 means not even last component is safe
Alternative is to print an error.
2021-08-09 17:42:00 +02:00
Fabian Homborg
af2952dd2f Allow passing directories to prompt_pwd
This allows us to test it without cd-ing about the place.
2021-08-09 17:42:00 +02:00
Fabian Homborg
7a8feb4656 prompt_pwd: Allow keeping components full length
And allow passing the parameters as options.
2021-08-09 17:42:00 +02:00
Andrew Schulman
afef67b4e8 Fix dirs returns false when $dirstack is empty 2021-08-09 12:43:03 +02:00
exploide
60a9dcbf05 updated ping completions
support for ping from iputils (version 20210202)
support for ping from inetutils (version 2.1)
support for ping from busybox (version 1.33.1)
support for ping from FreeBSD and macOS (by @juntuu)
2021-08-06 17:08:50 +02:00
Fabian Homborg
3ed49304f2 Completions 2021-08-04 21:09:47 +02:00
Fabian Homborg
fcbf303e05 Only do the macOS apropos thing if makewhatis is available
This won't work without it, and happens to be broken on jailbroken
iOS.

Fixes #8205.
2021-08-04 18:55:01 +02:00
Kid
c7c67755d3
Add --function to set completion (#8202)
* Add `--function` to `set` completion

* Resolve review

* Revert other changes
2021-08-04 08:49:51 +02:00
Johannes Altmanninger
1b20e75f19 Run fish_indent on share/**.fish 2021-08-01 18:59:45 +02:00
Branch Vincent
bb10cdbd77 add missing git commit completions 2021-07-30 19:39:53 -07:00
Sam Yu
ac6507776f
Add zypper subcommands completion (#8183)
* Add zypper subcommands completion

rename functions to avoid confusion

* Revert partial changes
2021-07-30 18:24:32 +02:00
exploide
ac81d370cd completion nmap: suppress warning when local scripts folder exists 2021-07-30 17:41:55 +02:00
Kevin Konrad
413fd2fc03 extract argcomplete completion mechanism into its own function 2021-07-28 18:10:59 +02:00
Kevin Konrad
336de2d9fa add completion for qmk 2021-07-28 18:10:59 +02:00
YAKSH BARIYA
0b8b535187
Add completions for gping (#8181) 2021-07-28 17:53:44 +02:00
Branch Vincent
d8465e0a86 document --no-config 2021-07-27 23:00:23 +02:00
Johannes Altmanninger
6c0af841e2 completions/set: fix quoting error 2021-07-23 22:02:01 +02:00
Johannes Altmanninger
72fd328ad2 fish_clipboard_{copy,paste}: only use xsel/xclip if $DISPLAY is set
Ubuntu's fish package on WSL 1 has xsel as recommended dependency,
even though there is no X server available.  This change makes us
use Windows' native clipboard even when xsel is installed.
2021-07-23 20:55:07 +02:00
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