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
David Adam
3ae12ac4d3
Revert "Escape separators (colon and equals) to improve completion"
...
This reverts commit f7dac82ed6
from pull
request #6059 .
As discussed in #6099 , this caused a regression in some completions (eg
dd).
2019-09-19 14:38:16 +08:00
Aaron Gyes
b7dd060dec
sample prompts: use $USER instead of (whoami)
2019-09-18 23:35:16 -07:00
Aaron Gyes
f35e18bb9b
complete.cpp: don't double escape commands in complete
output
...
The argument to --command was escaped both here and in
append_switch(), potentially producing incorrect output
2019-09-18 16:21:21 -07:00
Johannes Altmanninger
eea3bd5fc3
completions/git: improve completion for git restore and git switch
...
- suggest relevant files for git restore
- add `-r` to require an argument for some options
2019-09-18 14:08:43 -05:00
Johannes Altmanninger
ec834820f5
completions/git: handle 2 RM and 2 RD files
...
This commit makes git completions aware of files that are both staged as renamed, and have unstaged
modifications/are deleted.
__fish_git_files now potentially prints these files twice:
$ __fish_git_files renamed modified
foo Renamed file
foo Modified file
Fixes #6031
2019-09-18 14:03:11 -05:00
Johannes Altmanninger
8baea8b157
Do not add a space after completion if one is already there
...
Example: type `cd --help --help`, move the cursor inside the first `--help` and press tab.
This used to add redundant spaces.
2019-09-18 14:02:24 -05:00
Aaron Gyes
22811ebcf6
Remove unused macros
...
Most just left behind after actual code was moved into different files.
2019-09-18 01:31:03 -07:00
Aaron Gyes
715836cb0a
builtin_set_color.cpp: remove unnecessary .c_str()
2019-09-18 00:09:23 -07:00
Aaron Gyes
5f05d9734c
builtin_set_color.cpp: colorize set_color --print-colors
...
Each named color is now printed in that color, only if
hooked up to a TTY. Shouldn't affect scripts.
2019-09-18 00:05:09 -07:00
Aaron Gyes
61f0756fe6
builtins: Use standard builtin.h error macros more
2019-09-17 22:04:33 -07:00
David Adam
a10547018e
cmake: don't install realpath manpage on non-macOS systems
2019-09-17 20:54:11 +08:00
David Adam
e6d6c5c5c7
docs: improve realpath documentation
2019-09-17 20:48:22 +08:00
David Adam
02d82dcf85
docs: update all command synopsis formatting
...
Adds synopses for those commands missing them.
Moves all synopsis sections to code blocks. This improves the appearance, although highlighting as
fish code may not be the ideal appearance.
2019-09-17 17:59:04 +08:00
David Adam
c93c66f76b
docs: fix formatting in prompt_pwd manual
2019-09-17 17:31:47 +08:00
David Adam
605885f851
docs: whitespace cleanup in source
...
Fixes some lint warnings.
2019-09-17 17:28:19 +08:00
David Adam
f11ee26aae
docs: slight grammar improvement in source docs
...
[ci skip]
2019-09-17 16:37:35 +08:00
David Adam
4265b02eb3
docs: standardise on exit status terminology
...
Exit status is used in the POSIX specification and is preferred over return code/return status/exit
code.
[ci skip]
2019-09-17 16:37:01 +08:00
David Adam
2f6c8fb21a
docs: source creates a new local scope
...
Discussed in #4443 .
2019-09-17 16:25:12 +08:00
ridiculousfish
d903fe6073
Relnote fix for #3189
2019-09-14 16:42:28 -07:00
ridiculousfish
533ee65963
Allow binding nul (zero byte)
...
This sequence can be generatd by control-spacebar. Allow it to be bound
properly.
To do this we must be sure that we never round-trip the key sequence
through a C string.
2019-09-14 16:37:57 -07:00
ridiculousfish
5f6ee7f30f
Use the gold linker if available
...
The big reason to do this is that the gold linker doesn't complain about
_sys_nerr and _sys_errlist.
2019-09-14 15:09:08 -07:00
ridiculousfish
5afcc439a5
Clean up input_terminfo_get_sequence
2019-09-14 14:59:01 -07:00
ridiculousfish
5ebcd3de98
Remove some unnecessary string formatting
2019-09-14 14:22:37 -07:00
ridiculousfish
06269ed67d
Remove NOT_A_WCHAR
...
It's now unused.
2019-09-14 13:18:04 -07:00
ridiculousfish
8747018cbc
Use maybe_t in unescape_string_internal
2019-09-14 13:17:22 -07:00
ridiculousfish
fa1dab040b
Use maybe_t in read_unquoted_escape
2019-09-14 12:54:38 -07:00
ridiculousfish
7ea3255eef
Correct the exit expect test
...
There was an errant space which is not matched; this seems to cause problems
only on one machine for mysterious reasons.
2019-09-14 12:46:57 -07:00
ridiculousfish
cc5e29734b
Use maybe_t in string_last_char
2019-09-14 11:56:02 -07:00
Johannes Altmanninger
0ecfc25961
Fix highlighting of redirection to -
(close file descriptor)
...
Fixes #6092
2019-09-14 13:04:27 -05:00
David Adam
77ef2ef6c3
jobs: return success when a job is found via --last
...
Closes #6104 .
2019-09-14 13:01:36 -05:00
David Adam
737c2d156d
history: fixup exact matching by default
...
Work on #6070 . Fixup from 54ed2ad440
.
2019-09-11 23:12:10 +08:00
David Adam
e935f5ce89
docs: fix formatting of name of shells
...
Work on review comments in #5312 .
[ci skip]
2019-09-11 12:25:27 +08:00
David Adam
ccdef3936f
docs: improve introduction section
...
Work on review comments in #5312 .
2019-09-11 12:20:08 +08:00
Mahmoud Al-Qudsi
58cd1a5140
Eschew hard-coding rustup components in favor of a hack
...
[ci skip]
2019-09-10 03:23:59 -05:00
Mahmoud Al-Qudsi
32546d6491
Reorder rustup
completions to avoid undefined function error
...
[ci skip]
2019-09-10 03:23:55 -05:00
Mahmoud Al-Qudsi
85f93ff002
Add dynamic completions for rustup
...
[ci skip]
2019-09-09 20:55:08 -05:00
ridiculousfish
56d2942f59
Minor cleanup of how jobs store their command string
2019-09-09 09:07:25 -07:00