E.g. if "foo" is in CDPATH, and both "foo/bar" and "./bar" exist, `cd
bar` will go to ./bar.
The completions described "bar" as going to "foo/bar" ("CDPATH foo").
This fixes it by checking for ./bar's existence.
See #4475.
For some reason on Solaris the previous code was refusing to compile
with an error (regarding the declaration of stdout in the opts struct)
error: declaration of ‘__iob’ as array of references
The obvious guess that it had something to do with the name of the
variable in question proved true; renaming it from `stdout` to
`opts.stdout` allows the build to go through.
These messages are automatically generated as if `-w` were specified
at the gmake command line. The `--no-print-directory` option supresses
these messages.
macOS 10.5 and earlier do not support the convention of returning
a dynamically allocated string, plus this seems like an unnecessary
malloc. Always allocate a buffer for realpath() to write into.
It seems that `parse_cmd_opts` does not correctly handle no arguments,
and so argc was being decremented to -1 causing uninitialized memory
access when argv[0] was dereferenced at a later point.
No longer using `-` to indicate reading to stdout. Use lack of arguments
as stdout indicator. This prevents mixing of variables with stdout
reading and makes it clear that stdout may not be mixed with delimiters
or array mode.
Added an option to read to stdout via `read -`. While it may seem
useless at first blush, it lets you do things like include
mysql -p(read --silent) ...
Without needing to save to a local variable and then echo it back.
Kicks in when `-` is provided as the variable name to read to. This is
in keeping with the de facto syntax for reading/writing from/to
stdin/stdout instead of a file in, e.g., tar, cat, and other standard
unix utilities.
"Use the fish_update_completions command.", the answer to "How do I update man page completions?", was also found at the end of the answer to "How do I get the exit status of a command?"
\b does not match "end of spaces" but rather "start of a-z/0-9" and so
does not match the start of string '-c'. Match (and then re-insert) a
literal ' ' as part of the pattern instead.
Work around bug pypa/pip#4755
Don't expect all users to be running a version of pip2/3 that includes
the fix (once it's upstreamed). Will continue to work if/when pip2/3
emit the correct output. pip is already very slow at printing the
completions (see #4448) so the `sed` call overhead is neglible.
* Add pip completion
* We call native pip completion for fish if pip is installed
* Add pipenv completion
* We call pipenv native completion if pipenv is installed
* Applied changes as requested by @floam
* Changed usage of `test (command -v)` for just `command -sq`
* Add completions for pip2/3
* In some systems pip is not aliased and we have pip2 and pip3
* In those cases, we just load the completions for those commands
* Separate pip2/3 completions in their own file as requested by @floam
This silences binding errors due to keys not found in the current
termcap config in the default fish bindings.
Closes#4188, #4431, and obviates the original fix for #1155
It was necessary to re-implement builtin_bind as a class in order to
avoid passing around the options array from function to function and
as adding an opts parameter to `get_terminfo_sequence` would require
otps to be passed to all other builtin_bind_ functions so they could, in
turn, pass it to `get_terminfo_sequence`.
On powerpc64 (big-endian platform) one test failed as:
Testing file printf.in ... fail
Output differs for file printf.in. Diff follows:
--- printf.tmp.out 2017-10-02 18:14:17.740000000 -0700
+++ printf.out 2017-10-02 18:11:59.370000000 -0700
@@ -1,5 +1,5 @@
Hello 1 2 3.000000 4.000000 5 6
-a B 0 18446744073709551615
+a B 10 18446744073709551615
It happens due to roughly the following code:
swprintf(..., L"%o", (long long)8);
Here mismatch happens between "%o" (requires 32-bit value)
and 'long long' (requires 64-bit value).
The fix turns it effectively to:
swprintf(..., L"%llo", (long long)8);
as it was previously done for 'x', 'd' and other int-like types.
Makes tests pass on powerpc64.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>