Johannes Altmanninger
8063d6d0b8
complete builtin: suggest commands for options --comand and --wraps
2019-09-25 17:00:48 +08:00
Johannes Altmanninger
2dbbaa6a97
Honor required parameters in completions for builtins
...
This adds the -r (or -x) flag to completions of builtins' options that have a required_argument.
2019-09-25 17:00:48 +08:00
Aaron Gyes
8230755bfd
Make sure rgb_color_t doesn't grow
...
For years the comment above the class claimed it was 4 bytes, but
it had grown to 5. Add a static_assert() to prevent that from
happening again.
2019-09-24 23:34:10 -07:00
Jakob Landbo
ed0a7f5cdb
completions/git: Added autostash option to rebase
2019-09-24 21:59:26 +08:00
David Adam
10f38c6865
CHANGELOG: work on 3.1.0
...
[ci skip]
2019-09-23 23:29:43 +08:00
Aaron Gyes
e6c72f74a8
make rgb_color_t smaller
...
rgb_color_t was 5 bytes, now it's 4 again.
big arrays holding colors are going to be smaller.
2019-09-22 21:16:30 -07:00
ridiculousfish
91c4dad812
Revert "use std::tolower"
...
This reverts commit a3db4128bc
.
This broke the build.
2019-09-22 15:33:08 -07:00
Aaron Gyes
a3db4128bc
use std::tolower
2019-09-22 15:47:22 -07:00
ridiculousfish
a19d9b2e73
Add a test for #6130
2019-09-22 14:06:38 -07:00
Johannes Altmanninger
bc533ad939
Fix completion inside command substitution inserting spurious quote
...
Reproducer: type `: (: ""`, move the cursor after the second colon and press tab.
2019-09-22 14:06:38 -07:00
Aaron Gyes
eef62b8848
Correct wc completions for macOS, BSDs.
2019-09-22 14:02:22 -07:00
Johannes Altmanninger
d99c19cc03
Fix completions for chown ( #6132 )
...
Reproducer: type `chown --f<TAB>`
2019-09-22 10:01:41 -07:00
ridiculousfish
70a1d8314c
Optimize parse_color
2019-09-21 19:36:56 -07:00
Aaron Gyes
902c6ec4a3
Check for {g,}date existance before trying --version
2019-09-21 18:42:55 -07:00
Aaron Gyes
7804a5e477
Revert "Correctly detect the presence of gdate"
...
This reverts commit 4b181df254
.
It will result in systems without a GNU date having a literal "N"
in the output.
2019-09-21 18:40:32 -07:00
ridiculousfish
6bbf3726fc
Relnote expand-abbr and self-insert changes
2019-09-21 16:06:19 -07:00
ridiculousfish
e1f46d22de
Simplify space binding and fix search
...
With the new support for self-insert inserting a bound sequence,
the default binding for space as expanding abbreviations can be simplified
to just `self-insert expand-abbr`. This also fixes the bug where space
would cancel pager search.
2019-09-21 16:06:19 -07:00
ridiculousfish
18b56637f7
self-insert bindings to insert their own sequence
...
Prior to this fix, self-insert would always wait for a new character.
Track in char_event what sequence generated the readline event, and then
if the sequence is not empty, insert that sequence.
This will support implementing the space binding via pure readline
functions.
2019-09-21 15:58:57 -07:00
ridiculousfish
1ecbe363d0
Correct an assertion message
2019-09-21 15:17:09 -07:00
ridiculousfish
3f7bc7232e
yank_POP -> yank_pop
2019-09-21 14:31:22 -07:00
ridiculousfish
5f64972908
Do not try the same (command, wraps) pair more than once when completing
...
This prevents runaway wrap chains. Fixes #5638 .
2019-09-21 14:09:38 -07:00
ridiculousfish
77dbe109e0
Allow cancellation out of expanding a runaway wrap chain
...
This makes it easier to control-C out of a completion.
2019-09-21 13:11:45 -07:00
ridiculousfish
3f2f44ce73
Introduce reader_test_should_cancel
...
This centralizes the logic around cancellation due to either sigint or a
stale threaded operation.
2019-09-21 13:07:55 -07:00
ridiculousfish
95aea7839d
Show wrap targets when printing a function
...
Fixes #1625
2019-09-21 12:48:51 -07:00
ridiculousfish
a1f1abc137
Stop passing true to escape_string
...
It wants a flags, not a boolean.
2019-09-21 12:40:24 -07:00
Johannes Altmanninger
a7ea7648c3
Completion: maintain cursor position when there is no completion
...
Previously, tab-completion would move the cursor to the end of the current token, even
if no completion is inserted. This commit defers moving the cursor until we insert a completion.
Fixes #4124
2019-09-21 12:50:52 -07:00
Johannes Altmanninger
e9e92178a9
completions: simplify prefix computation
2019-09-21 12:50:52 -07:00
Johannes Altmanninger
6c5c0a73eb
remove useless call, fix comment
2019-09-21 12:50:52 -07:00
ridiculousfish
4b181df254
Correctly detect the presence of gdate
...
Fixes some test spew
2019-09-21 12:12:08 -07:00
ridiculousfish
d7c695114a
Switch from subprocess.run to subprocess.check_call
...
Restores Python 2 compatibility in conf.py
2019-09-21 12:04:21 -07:00
ridiculousfish
56c0b99799
Format conf.py with black
2019-09-21 11:58:58 -07:00
David Adam
66fd52aa15
fish_xgettext: update translation generation for new build system
...
Closes #6123 .
2019-09-21 22:29:19 +08:00
LawAbidingCactus
d4a5ef1703
rewrite __fish_complete_gpg2_key_id to produce better output
2019-09-21 22:04:17 +08:00
LawAbidingCactus
b8ba04dcf4
fix compatibility with BSD sed
2019-09-21 22:04:17 +08:00
LawAbidingCactus
2f67cb341c
add remaining gpg2-specific completions; formatting
2019-09-21 22:04:17 +08:00
LawAbidingCactus
1a59731ea7
Create updated completions for gpg2
2019-09-21 22:04:17 +08:00
LawAbidingCactus
d2e9ee290c
rewrite __fish_complete_gpg_key_id to produce better output
2019-09-21 21:58:59 +08:00
David Adam
8e0aa03c4a
cmake: sphinx-manpages requires fish_indent for version number
...
Fixes issue #6216 .
Problem introduced in 3b8505bebe
.
2019-09-21 16:32:24 +08:00
Aaron Gyes
102ddd2b79
tests/checks/complete.fish: don't check unsorted lines
2019-09-19 15:44:15 -07:00
Aaron Gyes
6459682c93
Work around indeterminant ordering for complete test
...
Not a cool fix but it should work
2019-09-19 15:35:25 -07:00
Aaron Gyes
9486af8805
tests: fix date --version printing junk, update interactive.fish
2019-09-19 15:06:51 -07:00
Aaron Gyes
53a3533285
Add tests for complete
(no args) output
...
Hopefully this should catch things if the output gets broken again.
2019-09-19 15:01:09 -07:00
Aaron Gyes
5c06e68115
tests: add a lame gdate-based ms-precision timer if installed
...
I got tired of seeing ' ... ok (0 sec)' so now with GNU date/gdate
installed there is millisecond output shown. One can get rough
nanoseconds from gdate.
2019-09-19 14:26:53 -07:00
Aaron Gyes
2b7b70a64f
Ellipsis OCD
2019-09-19 11:48:37 -07:00
Aaron Gyes
fda8ad429b
parse_util.cpp: remove truncate_string()
...
We already have something that does this
2019-09-19 10:32:07 -07:00
Aaron Gyes
cb79d8fa97
Colorize complete
output
...
If interactive, `complete` commands are highlighted like they would
be if typed. Adds a little fun contrast and it's easier to read.
Moved a function out of fish_indent to highlight.h
2019-09-19 04:27:33 -07:00
Aaron Gyes
620761b9b9
complete: print long option names for less common ones
...
we now print --long options for ones I arbitrarily decided
are less likely to be remembered.
Also fixed the `--wraps` items at the end not being escaped
2019-09-19 04:21:24 -07:00
Aaron Gyes
e9ee2fb089
complete: support -k (--keep-files) in printed completions
2019-09-19 02:01:33 -07:00
Aaron Gyes
7302dcc12b
complete: terser output with short options
...
Most of our completion scripts are written using the short options
anyhow, and this makes it less likely the output will span several
lines per command
2019-09-19 01:50:26 -07:00
David Adam
3b8505bebe
sphinx: get version number from built binary
2019-09-19 15:05:39 +08:00