This searched for package.json in any parent, so just like finding
.git and .hg directories it _needs_ to use the physical pwd because
that's what git/hg/yarn use.
In general, if you do _any_ logic on $PWD, it should be the physical
path. Logical $PWD is basically only good for display and cd-ing
around with symlinks.
[ci skip]
This called `eval $fish_browser --version` to figure out if it is
lynx.
That's really not worth it just to support edge-cases using a rather
unusual browser, to work around a bug in it.
Instead we just see if the browser name starts with "lynx", which
should work in 99.9% of cases.
This created another local version of the variable just for the if-block.
Can't say I love the space prefix, but then I think we have too many
of these modes anyway.
If you use these to figure out if there _are_ staged files, or dirty
or whatever, you currently need to check the output, which relies on
the configured character.
Instead, we let them also return a useful status.
Notably, this is *not* simply the status of the git call.
__fish_git_prompt_X returns 0 if the repo is X.
This works for untracked, but the "diff" things return 1 if there is a
diff, so we invert the status for them.
See #5748.
[ci skip]
A function file for a function used only by one completion (and
unlikely to be used anywhere else).
If another user shows up, we can move it out again.
Part of #5279
[ci skip]
Similar to the last commit, only for the in-terminal-paste stuff.
Also cleans up the comments on bracketed paste a bit - nobody has
stepped forward to report problems with old emacsen or windows, so
there's no need for a TODO comment.
See #4327.
If we're at the beginning of the commandline, we trim leading whitespace so we don't trigger histignore.
Since that's the main issue of problems with histignore:
Closes#4327.
Apparently if you install gnu coreutils on OpenBSD, the tools are
g-prefixed. So we definitely want to just alias that rather than
provide our lousy shell script implementation.
25d83ed0d7 (included in 3.0.0) added a `string` check that
did not use `--`, so negative numbers were interpreted as options.
Apparently nobody is using this.
(Again, this is for the `seq` fallback used on OpenBSD)
That seems suspect.
It removes files starting with "# Autogenerated", but those files
usually do not show up in ~/.config - they're in ~/.local/share.
So let's be careful and not mess with the user's config.
(I'm pretty sure that the previous commit re-enabled cleanup as the
`~` was quoted before then)
[ci skip]
This did `argparse`, but only handled "--help". Any other options
would be ignored.
Instead, we just pass all the options through to python, and that'll
display help if needed.
This allows passing e.g. `--verbose 1` to help with debugging.
[ci skip]