Commit Graph

3531 Commits

Author SHA1 Message Date
Colin Woodbury
a0b46e6204 Update Aura completions 2020-08-13 00:29:55 +02:00
Johannes Altmanninger
46a69d6b90 Simplify prime-run completions 2020-08-10 20:46:07 +02:00
oriko1010
8b02a78887 Add completion for prime-run 2020-08-10 20:44:20 +02:00
Johannes Altmanninger
9c327b19a6 Fix extra or missing newlines at end of file in our fish scripts
New fish_indent does that too, so this will make any future reformatting
diffs smaller.

Done using either of:

	perl -pi -e 'undef $/; s/\n*$/\n/' share/**.fish
	kak -n -f '<a-/>\n*<ret>d' share/**.fish
2020-08-09 23:53:46 +02:00
Johannes Altmanninger
918c62863e Fix typo 2020-08-09 23:53:46 +02:00
Johannes Altmanninger
93cb0e2abb __fish_complete_suffix: enable fuzzy completion, simplify
fish's internal completion logic is much smarter than the globbing in this
function, so let's just reuse "complete -C", and filter directories and
files with the given suffix.

Thanks to @Kratacoa for reporting on Gitter.

Using "complete -C" works well no prefix is given. Since in this repository
only the openocd completions pass a prefix, I left the prefix-case as is.
It could probably be improved and simplified as well.  The prefix argument was
introduced to avoid cd's side effects inside a completion. Using cd is tempting
though because it would allow to use the same logic as without a prefix.
2020-08-08 22:59:41 +02:00
Johannes Altmanninger
0dd334ee46 __fish_complete_suffix: replace prefix only at start 2020-08-08 22:56:54 +02:00
Johannes Altmanninger
b7bd7e9916 Clean up some __fish_complete_suffix usage
Also don't cd in pine completions.
2020-08-08 22:56:54 +02:00
Fabian Homborg
203061292f Remove unused "__fish_prompt_cwd" variable
The repaint handler erased a variable that was just a dumb cache when `set_color` wasn't a builtin.

It was removed in 3f11d90744 in 2014.
2020-08-07 21:06:16 +02:00
Fabian Homborg
677e699a7a Stop repainting after paste
"repaint" here is a bit of a misnomer. It *doesn't* re-highlight, that
just happens on its own.

It re-runs the prompt, which can take quite a while (depending on the
configuration), and which is also useless in this context as this
isn't something the prompt will be reacting to (theoretically it
could, but I doubt the utility of displaying "PASTE" for a few milliseconds).
2020-08-07 21:06:16 +02:00
Fabian Homborg
be9d17b08a help: Add the other pages 2020-08-07 21:06:16 +02:00
Johannes Altmanninger
d7ccc475cf Cleanup __fish_complete_subcommand
The external-commands-only completion was briefly added in 3.1.0 and removed
in 3.1.1 (see #6798), which means we can remove some dead code.

Maybe we should just remove __fish_complete_external_command - it could break
users, but then again, we don't really have a way to stop people from starting
to use this deprecated function. The underscores ought to communicate that
this is function is private to fish but that is not enforced.
2020-08-06 21:24:26 +02:00
Soumya
916ffe8273 Only bold status in default prompt when set by last command
Uses regular text when the status is carried over, e.g. after a background job.
2020-08-05 12:23:49 -07:00
Allen Sobot
54823c9243
Implement XBPS completions (#7239) 2020-08-05 20:01:19 +02:00
Johannes Altmanninger
ac1f63781d __fish_complete_suffix: don't fail when a part of the suffix is present
Resolves #7233
2020-08-01 17:04:03 +02:00
Daniel Kravetz
7a77907b62
Update k3d completions (#7232) 2020-08-01 13:41:44 +02:00
Olivier FAURE
e7f0b5801d Add forward-single-char input command
This allows users to add custom keybindings to autocomplete only one
character at a time.

Resolves https://github.com/fish-shell/fish-shell/issues/4984
2020-08-01 12:09:31 +02:00
ridiculousfish
1c2323e76f Use dashes instead of underscores pervasively in tutorial anchors
This fixes some broken help completions.
2020-07-31 12:10:16 -07:00
Gokul Soumya
b259fe17f9 vi-keybingings: Add missing abbr triggers for command terminators
Abbr expansion on command terminators were added
back in ec74c739 in response to #6970, but vi mode
was not updated.
2020-07-30 01:04:03 +02:00
Fabian Homborg
84b25855b0 alias: Escape the first word again
See https://stackoverflow.com/questions/63115744/alias-with-spaces-and-arguments-in-fish-3

This was broken in 115892ccd2
2020-07-27 17:19:44 +02:00
Johannes Altmanninger
233945b58b completions/git.fish: fix completions for "git config"
gui.fontui can be like "-family ..."
2020-07-25 18:53:24 +02:00
Shun Sakai
25e9a758ad Add completions for p7zip 2020-07-24 17:42:44 +02:00
Stefan Tatschner
d4fafc15ca completions: Remove -f from pacman -U
pacman -U is intended to be used with (among others) files like this:

        # pacman -U ./linux-headers-5.6.2.arch1-2-x86_64.pkg.tar.zst

Thus, let's enable file path completion for this kind of operation.
2020-07-24 19:49:20 +08:00
Fabian Homborg
5b706faa73 open: Workaround an xdg-open bug
If it can't recognize the DE, xdg-open uses a "generic" way of opening
things where it doesn't spawn off a DE-provided utility like kde-open.

This sounds great, but it fails to fork and therefore blocks the
terminal.

So we start it in the background and disown it.

Fixes #7215.
2020-07-21 16:59:05 +02:00
Daniel Kravetz
0f78700f6b Update share/completions/k3d.fish
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2020-07-16 15:11:40 -07:00
Daniel Kravetz Malabud
da16e8c6b3 Add k3d completions 2020-07-16 15:11:40 -07:00
Fabian Homborg
42486a4cb3 Don't do CWD OSC in tests
Should fix #7193.
2020-07-13 20:55:39 +02:00
Mahmoud Al-Qudsi
9f8e4ab524 Don't load vendor extensions when running unit tests
a) they can screw up our expected output/behavior
b) they can blow up your system

In my case, the unit tests were calling Pantheon's fish integration
script which would then proceed to blow up dbus with messages about each
individual test completing.
2020-07-12 19:14:35 -05:00
Mahmoud Al-Qudsi
f1a59e83c5 Move __fish_set_lscolors to ls.fish
It's not used anywhere else.

[ci skip]
2020-07-12 14:18:42 -05:00
Gokul Soumya
ec0c3f349d Return early if token is empty in whatis_current_token 2020-07-12 00:15:24 +02:00
Gokul Soumya
5f782cef7d Show builtin description with whatis_current_token 2020-07-12 00:13:51 +02:00
Gokul Soumya
e665f9b523 Precedence for functions over commands in whatis_current_token 2020-07-12 00:11:37 +02:00
Gokul Soumya
d0ce5fe943 Show function description if available with whatis_current_token
By default __fish_whatis_current_token is bound to ALt-W
2020-07-12 00:11:37 +02:00
Johannes Altmanninger
1f8c9a5d42 __fish_print_help: handle [ and : 2020-07-12 00:11:37 +02:00
Charles Gould
c2fe319af0 fish_config: 'Webify' color definitions
The colors defined in `colorutils.js` are specified in
fish format, and therefore RGB values lack the leading
`#` character and do not fully follow the html/css spec
(w3.org/TR/css-color-4/#typedef-hex-color).

Web config sends these values as-is to the browser,
without first converting to a browser-friendly format.
While this (somehow) works for the most part, a few
colors get lost along the way and do not display in
the customization selector nor in the preview when
selected. This behavior was seen in Firefox.

To fix this, let's prepend the missing '#' character
to all RGB colors defined in `colorutils.js`.
2020-07-11 13:51:52 -07:00
MaxVerevkin
aff2e76021 create_manpage_completions.py: introduce TypeScdocManParser which is capable of parsing scdoc manpages
This greatly improves generated completions for scdoc man pages, see #7187.
2020-07-11 17:39:36 +02:00
MaxVerevkin
d3661b3808 create_manpage_completions.py: add .SH and .UN sections in Type2ManParser
This improves some generated completions, for example:

	diff -u completions.old/g3topbm.fish completions.new/g3topbm.fish
	+complete -c g3topbm -o stop_error -d 'This option tells g3topbm to fail when it finds a problem in the input'
	-complete -c g3topbm -o stop_error
2020-07-11 17:36:07 +02:00
MaxVerevkin
23c78a74e4 create_manpage_completions.py: do not use '|' in '[]' in regex 2020-07-11 15:52:16 +02:00
MaxVerevkin
4f867ce513 create_manpage_completions.py: refactor 2020-07-11 15:52:16 +02:00
MaxVerevkin
d1ad143cf1 create_manpage_completions.py: refactor: clean up parse_manpage_at_path 2020-07-11 15:52:16 +02:00
MaxVerevkin
75f93a590e create_manpage_completions.py: refactor: clean up parse_and_output_man_pages 2020-07-11 15:52:16 +02:00
MaxVerevkin
0d863378ea create_manpage_completions.py: refactor: remove unnecessary 'skip' 2020-07-11 15:52:16 +02:00
Johannes Altmanninger
0c9e651fdf create_manpage_completions.py: use correct capture group 2020-07-11 15:46:33 +02:00
Fabian Homborg
a40c82dcc4 Check if create_manpage_completions was installed
Fixes #7183.
2020-07-09 18:35:41 +02:00
Mahmoud Al-Qudsi
50e2a8dd72 [dnf] Fall back to dnf repolist when no sqlite3
[ci skip]
2020-07-08 11:24:29 -05:00
Fabian Homborg
213ac15caa Remove duplicate color
This was always wrong, but the new(er) angular actually complains
about it.
2020-07-06 20:10:01 +02:00
Fabian Homborg
4981115f73 webconfig: Fix "then" arguments
This used to use "success", which was our own thing, but which I can't
get working.

So instead we just use ".then", which only passes one object as an
argument that then contains all the other data we use.

This should be enough to complete the port to angular 1.8
2020-07-06 20:10:01 +02:00
Fabian Homborg
3f904b6a59 webconfig: Replace unsafe binding with filter
ng-bind-html-unsafe was apparently removed.
2020-07-06 20:10:01 +02:00
Fabian Homborg
9cfcdfa105 WIP Update angular to something from after the stoneage 2020-07-06 20:10:01 +02:00
Shun Sakai
d24a14744c
Update apk-tools completions (#7171)
* Update apk-tools completions

Add completions of options of it's subcommands.
The completions of deprecated options is unimplemented.

* Fix installed package listing for apk-tools

An error occurs when the local cache does not exist, so fixed this.
2020-07-05 18:22:36 -05:00