Commit Graph

12354 Commits

Author SHA1 Message Date
Johannes Altmanninger
28d67c8f0f Show completion list on Tab also if a common prefix was inserted
Fixes #6924
2020-04-23 20:19:57 +02:00
Johannes Altmanninger
095614ac54 Do not insert a space after completions ending in a comma or dot
For the last 15 years the space was only skipped when the completion
ended in one of "/=@:". Add ".," since they are also sometimes used to
separate independent words within a token.

Fixes #6928
Improves on #6833
2020-04-23 20:11:55 +02:00
Fabian Homborg
1d57da7291 commandline: Don't complain if insert mode has nothing to insert
That's just, like, a normal thing to happen.

We can return false, but it's not an error worth complaining about.

See #6931.
2020-04-23 17:17:19 +02:00
239
4d596a8f1d
Merge branch 'master' into completions-update 2020-04-23 14:01:42 +02:00
Fabian Homborg
02baa321ae Restyle
More of that weird reflowing that clang-format loves to do
2020-04-21 21:11:26 +02:00
Fabian Homborg
c7c10c8b10 __fish_ps: Use builtin realpath
We might want to find a better home for that builtin.
2020-04-21 21:11:26 +02:00
Fabian Homborg
18b2a65fdc Remove unused --inherit-variable 2020-04-21 21:11:26 +02:00
Jason Nader
18efd7dd48 Fix string split docs 2020-04-21 18:36:56 +02:00
Fabian Homborg
6ebbe5a450 fish_clipboard_copy: Stop adding newlines
When this switched over from directly piping commandline to storing
its output and using printf, I inadvertently always added a trailing
newline. That's probably annoying.

Note that this will now always *remove* a trailing newline (because
the command substitution does). That will barely make a
difference (because trailing newlines are quite unusual in the
commandline) and will probably feel better than keeping it - we could
even make a point of removing trailing whitespace in general.

Fixes #6927
2020-04-21 07:26:27 +02:00
Jason Nader
ea65db9421 string split: update docs 2020-04-20 22:39:48 +02:00
Jason Nader
6a839519b9 string split: add --allow-empty flag to be used with --fields 2020-04-20 22:39:48 +02:00
Jason Nader
f66285d7a1 dogfood string split -f 2020-04-20 22:39:48 +02:00
Jason Nader
3bb86d3a61 string split --fields: handle multi-line/arg input 2020-04-20 22:39:48 +02:00
Fabian Homborg
3f95440f26 completions: Use commandline -opc, not just -o
`commandline -o` tokenizes *the entire commandline buffer*.

See #6922.
2020-04-20 19:43:01 +02:00
Charles Gould
2421eb6180 docs: Add completions for fish_key_reader 2020-04-19 07:06:31 +02:00
Johannes Altmanninger
0fb58ab625 highlight: normalize path when validating path for cd
As builtin cd does.

Fixes #6915.
2020-04-19 07:01:25 +02:00
Johannes Altmanninger
9f45ff63d3 refactor: use mark_repaint_needed over reader_repaint_needed in reader
Making the reader_data_t member functions consistent, some already used
mark_repaint_needed.
2020-04-19 05:51:25 +02:00
Johannes Altmanninger
23427f3168 Add test for ~ (togglecase-char and togglecase-selection) 2020-04-19 05:51:25 +02:00
Johannes Altmanninger
9c6e81a838 Support busybox ps in process completions
Fixes #6918
2020-04-19 05:51:25 +02:00
Weisi Dai
6ab2d78936 Doc: Fix dead link to POSIX man page "test". 2020-04-19 04:25:04 +02:00
Alan Somers
3d0581d195 fish_hg_prompt should return 1 when not in a mercurial directory 2020-04-19 04:24:28 +02:00
ridiculousfish
3e8422f472 terminal_maybe_give_to_job to stop returning error on ENOTTY
Prior to this fix, if job control is enabled but stdin is not a tty, we
would return an error from terminal_maybe_give_to_job which would cause us
to avoid waiting for the job. Instead just return notneeded.

Fixes #6573.
2020-04-18 16:26:54 -07:00
Joel Kuhn
a3dfa21737 Change vi-mode tilde to toggle character case
This updates the behavior of tilde to match the behavior found in vim.
In vim, tilde toggles the case of the character under the cursor and
advances one character. In visual mode, the case of each selected
character is toggled, the cursor position moves to the beginning of
the selection, and the mode is changed to normal. In fish, tilde
capitalizes the current letter and advances one word. There is no
current tilde command for visual mode in fish.

This patch adds the readline commands `togglecase-letter` and
`togglecase-selection` to match the behavior of vim more closely. The
only difference is that in visual mode, the cursor is not modified.
Modifying the cursor in visual mode would require either moving it in
`togglecase-selection`, which seems outside its scope or adding
something like a `move-to-selection-start` readline command.
2020-04-18 14:59:37 +02:00
Jouke Witteveen
93b86bbe63 systemctl completions: Use --plain where appropriate
The --plain flag drops the '●'-glyph and generally makes the output more
suitable for automated processing.
2020-04-18 11:11:27 +02:00
exploide
8e418f5205 updated su completions 2020-04-18 10:54:06 +02:00
Jason Nader
85a8deabe9 Run fish_indent on all files 2020-04-18 10:53:11 +02:00
Delapouite
8d20748f4a doc: add section about directory history / stack
This PR also adds "See Also" section in the related commands.
2020-04-18 10:40:48 +02:00
Fabian Homborg
d2cc59dc73 github actions: Disable macOS for now
This just fails left and right. Once we've merged the pexpect stuff
and remove the too-tight tests we can try enabling it again.
2020-04-18 10:31:22 +02:00
Fabian Homborg
157469038f completions/duply: Stringify
This used a hardcoded "/bin/ls" for unknown reasons.

For one that's unnecessary, for another we don't want to parse string.

Use globs instead.
2020-04-18 10:29:18 +02:00
Fabian Homborg
6004d04da6 completions/rmmod: Stop hardcoding lsmod location
No idea what that was supposed to accomplish to begin with.

Fixes #6912
2020-04-18 10:26:55 +02:00
Johannes Altmanninger
be36c96028 alias.fish: unbreak listing aliases without backslashes
The description for an alias which already has escape sequences will
use backslash escapes for quoting; usually `string escape` can simply
quote it.  Use a regex that accepts either escaping style.
2020-04-18 09:35:33 +02:00
Johannes Altmanninger
9eb2b69a51 alias.fish: list aliases that are escaped, not quoted
Fixes #6910
2020-04-17 23:16:43 +02:00
Charles Gould
d3e720a045 docs: Use underscore in argument placeholder 2020-04-17 22:29:12 +02:00
Charles Gould
44976a5d31 docs: Remove extra colon to fix formatting 2020-04-17 22:29:12 +02:00
jeanprey
052d8d3a10 Activate untracked status in hg prompt
Correction of a typo that prevented the display of untracked status on the detailed prompt.
2020-04-16 19:18:22 +02:00
Fabian Homborg
6669240f81 Automatically lock closed issues/prs after 90 days
We've been getting a bunch of comments on old closed issues. Instead
people should create new ones.

This adds a github "workflow" that should lock closed issues/prs after
90 days, except those labelled "question".

Let's see how it works out.
2020-04-16 18:54:38 +02:00
David Adam
021679b17c completions/nc.traditional: add missing fish suffix to file
Noted in
https://github.com/fish-shell/fish-shell/pull/6873#issuecomment-614290625
2020-04-16 23:17:02 +08:00
Johannes Altmanninger
17ed8d25a4 Fix builtin "read" up-arrow search skipping first entry
Fixes #6892
2020-04-14 01:30:54 +02:00
Benjamin Kellermann
de9f4cb252 add completion for netcat
- implement the most common netcat variants on Linux
  - nc.openbsd
  - nc.traditional
  - nc/netcat tries to guess which netcat is currently used
2020-04-13 23:45:40 +02:00
Benjamin Kellermann
0a40a6d551 add completion for nmap 2020-04-13 23:45:40 +02:00
Johannes Altmanninger
1634a3b15c docs: don't quote code snippets
The added single quotes don't look great in HTML, and it's already clear
that the monospaced text is to be interpreted literally.
2020-04-13 22:56:22 +02:00
Johannes Altmanninger
671b941b52 Fix ninja target completions without the -C flag 2020-04-13 22:56:22 +02:00
exploide
82b811281d added completions for groups (coreutils) 2020-04-13 22:56:22 +02:00
Rosen Penev
d9ad5a2627 remove unreachable break statements
Found with clang's -Wunreachable-code-break

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-12 17:02:17 -07:00
Rosen Penev
6ab2da0e25 Fix -Wundef warnings
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-12 17:02:17 -07:00
Rosen Penev
ca57bcbb00 add several noreturn statements
Found with clang's -Wmissing-noreturn

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-12 17:02:17 -07:00
Rosen Penev
202fe39d34 fix unreachable code warning
Found with clang's -Wunreachable-code

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-12 17:02:17 -07:00
Jason Nader
d278ff4e45 Use the new string split --fields feature 2020-04-12 14:01:21 -07:00
Weisi Dai
07fb55d342 fish_indent: Add notes on SPACES_PER_INDENT. 2020-04-12 13:43:45 -07:00
David Adam
3bb374319a debian packaging: recommend python3-distutils for web config
Reported downstream as
https://bugs.launchpad.net/ubuntu/+source/fish/+bug/1867615
2020-04-11 22:18:31 +08:00