This patch adds completion for the update subcommand, that is, when the
user types in `composer update <tab>`.
The code depends on python for the json parsing. I'm not sure if this
is appropriate or if there is a fish-native way to parse json data.
Use suggestions for remove subcommand.
Add suggestions for why, why-not and depends.
Add why/why-not suggestion.
A semi-empty var is one with a single empty string element. The
`env_var_t::empty()` method returns true for such vars but we want
`set --show` to report that it has a single empty element.
This reverts functional changes in commit
ea3e9698df.
* Annotated tags only should be used for releases - see #3572 for
examples of where we want to use lightweight tags.
See also git-tag(1) on the purpose of annotated and lightweight tags.
* Version numbers are numbers and should not start with a branch name.
The commit ID is embedded in the version and uniquely identifies the
history. `fish --version` and `echo $FISH_VERSION` contain this
information.
(cherry picked from commit dcb39bfa86)
Now that we're working on the 3.0.0 major release it is more important
than ever that fish binaries built by developers have version strings
which clearly communicate where they came from.
getopt doesn't work very well in the BSDs, and getent has plenty of
fallbacks to replace it when it's not available.
<https://github.com/terrycloth/fish-shell/commit/
47a768ceeaef1d702624802d83338edbcc0f377c#commitcomment-23613921>
Newer versions of GCC and Clang are not satisfied by a cast to void,
this fix is adapted from glibc's solution.
New wrapper function ignore_result should be used when a function with
explicit _unused_attribute_ wrapper is called whose result will not be
handled.
This reverts commit ee15f1b987.
The test relies on undefined behaviour (checking for errno in the
absence of an error condition) and was broken on OpenBSD.
Closes#4184.
Specifically closes#4313.
Not being as agressive in what we ignore/blacklist, but can be revisited
easily in the future to add more characters to the argument blacklist.
* Clarify dependencies: required vs optional, and build vs runtime.
A first pass at updating the dependency documentation, based on the
discussion in this thread:
https://github.com/fish-shell/fish-shell/issues/2062
* Clarify notes on dependency errors, tests, and VCS integration.
An optional feature that suggests you install Python is okay;
core-dumping is not.
The note on tests was about fish development tests, not the `test`
builtin for conditional syntax.
Specifically mention git, hg, and svn in the VCS section.
By far the most common problem with universal variables being overridden
by global variables is other values being imported from the environment;
the `set -q; or set -gx` is much more of an edge case.
* Fix clearing abandoned line with VTE
With VTE-based terminals, resizing currently causes multi-line prompts
to go weird.
This changes the sequence we use to clear the line to one suggested by
a VTE
developer (https://bugzilla.gnome.org/show_bug.cgi?id=763390#c4).
It changes nothing in konsole 17.04.3 and urxvt 9.22, but they already
work.
Note that this does not fix the case where output did not end in a
newline, but that doesn't seem to be up to us. Also, it only affects
those lines.
Fixes#2320.
* Use terminfo definition instead of hardcoding
Thanks to @ixjlyons.
These completions never actually worked and always fell back to the
builtin path completion. But a recent fix means that these now keep the
fallback from happening resulting in no completions for these commands.
Doing `set -U var` when a global named `var` exists can result in
confusing behavior. Try to limit the confusion by improving the warning
we write. Also, only write the warning if interactive.
Fixes#4267
I decided this was just too useful not to include in our final fish 2.x
release. And since it does not modify any existing behavior it is safe
to include at this late date in the process of creating 2.7.
This silences warnings from the compiler about ignoring return value of
‘ssize_t write(int, const void*, size_t)’, declared with attribute
warn_unused_result [-Wunused-result].
The class `completer_t` declares `complete_special_cd`, an unused method. I searched the entire source tree and this declaration seems to be the only instance of `complete_special_cd`. There is no definition or uses which likely means this is dead code.
* Make npm run-script completion faster with `jq`
When jq is available, it's actually faster to invoke jq and parse the `package.json`
invoking the `npm` command.
Also, prior to this commit, both `__fish_complete_npm` and `__fish_npm_run` were being run
whenever completions for `npm run` subcommand was being used, which was actually making
repetitive work (invoking npm command twice). This pull request is supposed to make completion
without `jq` faster as well
* Refactor npm.fish for code reutilization
Created function to handle both cases of npm run completion parse, with or without `jq` completion.
* Remove unecessary blank line