This enables users to opt in (or out) of specific features by setting
the fish_features environment variable.
For example `set -U fish_features stderr-nocaret` to opt into removing the
caret redirection.
This partially reverts 5b489ca30f, with
carets acting as redirections unless the stderr-nocaret flag is set.
This flag is off by default but may be enabled on the command line:
fish --features stderr-nocaret
This introduces a new command line option --features which can be used for
enabling or disabling features for a particular fish session.
Examples:
fish --features stderr-nocaret
fish --features 3.0,no-stderr-nocaret
fish --features all
Note that the feature set cannot be changed in an existing session.
This teaches the status command to work with features.
'status features' will show a table listing all known features and whether
they are currently on or off.
`status test-feature` will test an individual feature, setting the exit status to
0 if the feature is on, 1 if off, 2 if unknown.
This introduces a new type features_t that exposes feature flags. The intent
is to allow a deprecation/incremental adoption path. This is not a general
purpose configuration mechanism, but instead allows for compatibility during
the transition as features are added/removed.
Each feature has a user-presentable short name and a short description. Their
values are tracked in a struct features_t.
We start with one feature stderr_nocaret, but it's not hooked up yet.
As it turns out, for some terminals backspace is \b but only when
preceded by \e.
All this makes about as much sense as the english language.
Fixes#4955.
This was done in share/config.fish, but leads to surprising results if
that isn't read - e.g. because someone just built fish in the git
directory to test it without installing.
It's also not something that is any more or less complicated.
For compatibility, keep it in config.fish as well for the time being.
The previous completion generation was broken for several reasons:
* ./foo would break detection of suffix due to the leading . being
interpreted an extension marker,
* ./foo would be completed as foo, which would be excluded from
matching inrcomplete.cpp
Using `git for-each-ref` both simplifies the code (no need to deal
with detached heads anymore) and speeds it up.
With 1600 branches, the time goes from ~48ms to ~16ms.
- fix capitalization
- shorten descriptions
- implement subcommand shortcuts
- add arg completion for 'limit' and 'depth' switches
- improve arg completion for list subcommand in case of -p switch
bower was calling `__fish_should_complete_args`, the old name for
`__fish_should_complete_switches.`
yarn was parsing bower.json instead of package.json.
To be used by completions to directly determine whether it is either
possible or preferable to complete a switch (instead of a subcommand),
(presuming that switches must come before subcommands).
* __fish_can_complete_switches: we are in a position where a switch may
be placed.
* __fish_should_complete_switches: we're in a position to accept a
switch and the current token starts with `-` so we have no choice but
to do so.
Selectively reverts 156d4fb9b9.
`all-the-package-names` is still used to generate completions for `npm`
if it is installed, but it is not manually installed nor updated. It is
now the user's responsibility to do both, and it must be installed
globally.