This allows all variables to be set properly when the prefix or datadir changes.
The generated .pc file looks like this:
prefix=/usr/local
datadir=${prefix}/share
completionsdir=${datadir}/fish/vendor_completions.d
functionsdir=${datadir}/fish/vendor_functions.d
confdir=${datadir}/fish/vendor_conf.d
Name: fish
Description: fish, the friendly interactive shell
URL: https://fishshell.com/
Version: 3.1.0-402-g75ae172ba228-dirty
Closes: https://bugs.archlinux.org/task/65904
Building on OS X versions prior to 10.13.6 fails at the very end when
running `codesign`.
The `-options runtime`-argument isn't available on these earlier
versions of the OS.
Simply running codesign without that argument (on OS X <10.13.6) seems
to produce a runnable binary with no security warnings.
This allows code of the form `if jobs -q $some_pid` in scripts to check whether a previously started job is still running. Previously this would return the correct value, but also print an error message.
The invalid argument errors will still be printed.
Added test cases for both.
Add the input function undo which is bound to `\c_` (control + / on
some terminals). Redoing the most recent chain of undos is supported,
redo is bound to `\e/` for now.
Closes#1367.
This approach should not have the issues discussed in #5897.
Every single modification to the commandline can be undone individually,
except for adjacent single-character inserts, which are coalesced,
so they can be reverted with a single undo. Coalescing is not done for
space characters, so each word can be undone separately.
When moving between history search entries, only the current history
search entry is reachable via the undo history. This allows to go back
to the original search string with a single undo, or by pressing the
escape key.
Similarly, when moving between pager entries, only the most recent
selection in the pager can be undone.
$XDG_DATA_DIRS/vendor_{completions,conf,functions}.d
Additionally, CMake variables extra_{completions,conf,functions}dir are
appended, if they are not already contained in $XDG_DATA_DIRS.
If XDG_DATA_DIRS is not defined, we fall back to
$__fish_datadir/vendor_completions.d:${extra_completionsdir}
for completions. Same for conf and functions.
This adds initial support for statements with prefixed variable assignments.
Statments like this are supported:
a=1 b=$a echo $b # outputs 1
Just like in other shells, the left-hand side of each assignment must
be a valid variable identifier (no quoting/escaping). Array indexing
(PATH[1]=/bin ls $PATH) is *not* yet supported, but can be added fairly
easily.
The right hand side may be any valid string token, like a command
substitution, or a brace expansion.
Since `a=* foo` is equivalent to `begin set -lx a *; foo; end`,
the assignment, like `set`, uses nullglob behavior, e.g. below command
can safely be used to check if a directory is empty.
x=/nothing/{,.}* test (count $x) -eq 0
Generic file completion is done after the equal sign, so for example
pressing tab after something like `HOME=/` completes files in the
root directory
Subcommand completion works, so something like
`GIT_DIR=repo.git and command git ` correctly calls git completions
(but the git completion does not use the variable as of now).
The variable assignment is highlighted like an argument.
Closes#6048