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
When CMake's own curses logic fails to find curses/ncurses, we fall back to
pkg-config and manually link the required libraries. Some platforms (RHEL 6,
see #6587) require CURSES_EXTRA_LIBRARY=tinfo, so we link against libtinfo
if it's found but are happy to continue without it if it doesn't exist.
Closes#6587
This adopts the Contributor Covenant Code of Conduct 2.0
We don't currently have an email address for enforcement, once that's set up we can
add it in.
[ci skip]
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
We were previously aborting the main event loop before calling fish_exit
in the event of a SIGHUP. This patch causes the SIGHUP to be stored in a
separate state variable from a regular "must exit" condition so the
associated event can be fired before we terminate the loop.
All streams are redirected before the event is called to prevent a
SIGTTIN/SIGTTOU due to the user script reading/writing from a disposed
tty.
Closes#7014
This error only happens on recent versions of gcc, see previous
commit e6bb7fc973 for more info.
Instead of using `ignore_result()` here, I've added a `system_assert`
function/macro that mimics the behavior of all the other `system()`
calls in the file.
* 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.
Previously fish weak-linked wcsdup, wcsncasecmp, and wcscasecmp.
This enabled fish to be used on 10.6. However the minimum Mac version
is now 10.9, where these symbols are available.
This reworks the "a=" detection to be simpler.
If we detect a variable assignment that produces an error,
simply consume it.
We also take the opportunity to not highlight it as an error,
and add some tests.
Original commit is 1ca05d32d3.
Typing that command in an interactive prompt would make the highlighter thread
eat up CPU and memory. Probably not the right fix; I think the token should
already have been consumed when the error is detected, then there is no need
to consume it when unwinding.
When selectiong a large completion entry in the pager, it would clobber the
prompt. To reproduce, first run this command
complete -c : -xa '(
# completion entries that, when applied to the commandline
# need one, two, or three lines respectively
echo 1
echo 2(string repeat -n (math $COLUMNS - 5) x)
echo 3(string repeat -n $COLUMNS x)
printf %s\n n(seq $LINES)
)'
then type ": " and hit Tab repeatedly. When cycling through completion
entries, observe that fish always tries to render the pager with the same
size, even though the number of lines occupied by the command line buffer
changes due to soft wrapping.
Fix this by rendering the pager after the command line has been rendered, so
we know how many lines we have left.
This merges a sequence of changes which eliminates the "parse tree"
construct and replaces it with a new abstract syntax tree implementation.
This is simpler and easier to understand/use.
This switches fish_indent from parsing with parse_tree
to the new ast.
This is the most difficult transition because the new ast retains less
lexical information than the old parse tree. The strategy is:
1. Use parse_util_compute_indents to compute indenting for each token.
2. Compute the "gap text" between the text of significant tokens. This
contains whitespace, comments, etc.
3. "Fix up" the gap text while leaving the significant tokens alone.
This switches parse_util_compute_indents from parsing with parse_tree to
the new ast.
It also reworks the parse_util_compute_indents tests, because
parse_util_compute_indents will be the backing for fish_indent.