Commit Graph

7618 Commits

Author SHA1 Message Date
Mahmoud Al-Qudsi
98eceba124 Include flatpak improvements in Changelog for 2.7.0b1
(cherry picked from commit 03366333b2)
2017-10-11 06:27:53 +02:00
Mahmoud Al-Qudsi
1a3adf086d Coalesce string trim and string match in flatpak completions 2017-10-11 06:23:02 +02:00
David Adam
a136bbdad9 travis: run autoreconf with --no-recursive 2017-10-10 15:14:44 +08:00
Mahmoud Al-Qudsi
2d99623b17 Merge pull request #4407 from mqudsi/read_stdout
Support reading to stdout via builtin `read` invoked without parameters.
2017-10-10 08:37:41 +02:00
Mahmoud Al-Qudsi
101ada83cb Fix unit tests for read to stdout behavior 2017-10-10 08:34:50 +02:00
Mahmoud Al-Qudsi
8ffc3ab242 Drop no-longer-needed iostream header from src/builtin_read.cpp 2017-10-10 08:23:24 +02:00
Mahmoud Al-Qudsi
4780b28a93 Updated read docs to include new stdout behavior 2017-10-10 08:23:24 +02:00
Mahmoud Al-Qudsi
109769a147 Update Changelog.md to reflect new read builtin behavior 2017-10-10 08:23:23 +02:00
Mahmoud Al-Qudsi
d0bc04cb40 Change read to stdout behavior to kick in on no arguments only
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.
2017-10-10 08:23:23 +02:00
Mahmoud Al-Qudsi
ec56b632f5 Add read to stdout improvement to README.md 2017-10-10 08:23:23 +02:00
Mahmoud Al-Qudsi
06afcb43b4 Support reading to stdout via builtin read -
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.
2017-10-10 08:23:23 +02:00
Mahmoud Al-Qudsi
15bdf6fa00 Merge pull request #4404 from krader1961/history-glob-search
Implement `history search` glob searches
2017-10-10 08:17:16 +02:00
Mahmoud Al-Qudsi
7334d801cf Merge branch 'master' into history-glob-search 2017-10-10 08:17:02 +02:00
Mahmoud Al-Qudsi
e99f137356 Merge branch 'master' into history-glob-search 2017-10-10 08:16:21 +02:00
Aaron Gyes
8b9e5c9301 Remove iwyu.sh
One should use lint.fish.
2017-10-09 22:33:28 -07:00
Amitava Bhattacharyya
48797974d3 Remove extraneous reference in FAQ (#4459)
"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?"
2017-10-09 22:06:56 -07:00
Aaron Gyes
59dbc7ca6a Tweak ninja completions 2017-10-09 01:22:20 -07:00
Mahmoud Al-Qudsi
21473b20ec Update flatpak completions to work with latest flatpak
Closes #4456
2017-10-09 07:30:19 +02:00
Aaron Gyes
171dea73d7 Update .gitattributes for muparser 2017-10-08 06:49:49 -07:00
Mahmoud Al-Qudsi
ff66d2f3c1 Add more test examples, including expression negation
Closes #4383
2017-10-08 02:06:48 +02:00
Mahmoud Al-Qudsi
b61c4f1cbc Correct string replace usage in pip2/3 completions
\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.
2017-10-05 13:54:47 +02:00
Mahmoud Al-Qudsi
04bde6cf5b Document reasons for commmand name replacement in pip2/3 completions
(cherry picked from commit 429bdce4f1)
2017-10-05 13:33:45 +02:00
Mahmoud Al-Qudsi
78fe53406e Fix copy-and-paste pip3 -> pip2 typo
Thanks @floam. See #4448
2017-10-05 13:26:56 +02:00
Mahmoud Al-Qudsi
7e48f5cc4f Use string replace instead of sed with better regex for pip completions
(cherry picked from commit d74d3f2ca4)
2017-10-05 13:25:14 +02:00
Mahmoud Al-Qudsi
af12bcb117 fixup! Force correct names for pip2/pip3 command in completions 2017-10-05 13:11:14 +02:00
Mahmoud Al-Qudsi
b11ca2c01c Force correct names for pip2/pip3 command in completions
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.
2017-10-05 13:03:24 +02:00
Gabriel Birke
6ce03a4a36 Add script completion for composer
When no command is given or when using "run-script" parse composer.json
and look for the "scripts" section. Complete script names.
2017-10-05 10:47:34 +02:00
Aaron Gyes
d740b2a473 pip completions: use builtin source rather than eval function. 2017-10-04 21:50:09 -07:00
Cristian Prieto
1770e47eb0 Python's pip and pipenv completions (#4448)
* 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
2017-10-04 21:15:41 -07:00
Mahmoud Al-Qudsi
2dd2867a61 Implement limits for __history_completions in j completions 2017-10-04 17:52:58 +02:00
Mahmoud Al-Qudsi
f18b6868b7 Include --quiet in command builtin summary 2017-10-04 12:02:52 +02:00
Mahmoud Al-Qudsi
11ede92d3f Include bind changes in Changelog for 3.0b1 2017-10-03 11:20:17 +02:00
Mahmoud Al-Qudsi
811beb9dcc Document new -s/--silent bind switch 2017-10-03 11:20:17 +02:00
Mahmoud Al-Qudsi
6e933f1c8f Add -s to builtin_bind's allowed parameter list 2017-10-03 11:20:17 +02:00
Mahmoud Al-Qudsi
46d1334f95 Silence bind errors in default key bindings
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`.
2017-10-03 11:20:17 +02:00
Mahmoud Al-Qudsi
cebb63c1b5 Merge pull request #4444 from trofi/master
Fix 'printf "%o"' handling on powerpc64
2017-10-03 09:58:23 +02:00
Sergei Trofimovich
53fd356850 fix 'printf "%o"' handling on powerpc64
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>
2017-10-03 04:17:56 +03:00
Aaron Gyes
1ef310c3a8 Fix export returning 1 on success
Fixes #4435
2017-10-01 01:11:17 -07:00
Aaron Gyes
635e714bb4 Make italics/dim work on MacOS
Work around ancient terminfo on MacOS by hard-coding the correct escapes.
Fixes #4436.
2017-09-29 14:25:09 -07:00
Fabian Homborg
281d468285 Rewrite systemctl completion with argparse
This

- Offers more candidates

- Is more reactive (it'll always incorporate "--state=" and "--type="

- Is faster (about 800ms to about 120ms)

- Needs fewer function files

All __fish_systemctl_* functions except __fish_systemctl_services have
been removed.
2017-09-29 20:07:18 +02:00
PenegalECI
fd33e3e2c6 Globally improved french translations (#4372)
* Globally improved french translations

* Corrected translations following comments
2017-09-29 04:01:48 -07:00
Mahmoud Al-Qudsi
d6cd98320d Update Changelog with completion changes not in 2.7.0 2017-09-26 16:01:42 -05:00
Mahmoud Al-Qudsi
42860da8ba Updated changelog for 2.7.0b1 from Integration_2.7.0
Squashed commit of the following:

commit fb252e6e10
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Tue Sep 26 15:52:23 2017 -0500

    CHANGELOG.md: kdeconnect-cli, not kdecomplete

commit e031d91c19
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Tue Sep 26 15:49:59 2017 -0500

    fixup! Updated changelog with info about all new and updated completions since 2.6.0

commit 6366a67c21
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Tue Sep 26 15:36:37 2017 -0500

    fixup! Updated changelog with info about all new and updated completions since 2.6.0

commit 281be31eb3
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Tue Sep 26 15:21:01 2017 -0500

    Updated changelog with info about all new and updated completions since 2.6.0
2017-09-26 16:01:01 -05:00
Aaron Gyes
5d8986fdad install linx.lss with Xcode project 2017-09-26 13:32:57 -07:00
Mahmoud Al-Qudsi
a1ae484dce Merge pull request #4428 from mqudsi/customlss
Use a custom Lynx style sheet (LSS file) to work around Lynx bug
2017-09-26 14:34:38 -05:00
Mahmoud Al-Qudsi
338311af1e Install custom LSS script to /usr/local/share/fish on make install
Decided to move doc_src/fish.lss to share/lynx.lss, which just makes
more sense all around. Accordingly, now using {$__fish_datadir} instead
of {$__fish_help_dir} in help.fish.

Makefile now installs the custom lss on make install
2017-09-26 14:31:11 -05:00
Mahmoud Al-Qudsi
8b858f2fcc Use a custom Lynx style sheet (LSS file) to work around Lynx bug
Lynx uses a very naïve method of applying styles to HTML elements by
hashing the element type and the class name to generate a map of
hash:style. After the hash is calculated, Lynx does not go back and
check whether or not the actual string values match the LSS properties.

See the following links on the Links mailing list:
 * http://lists.gnu.org/archive/html/lynx-dev/2015-12/msg00037.html
 * http://lists.gnu.org/archive/html/lynx-dev/2015-12/msg00039.html

This patch copies the default Lynx stylesheet but removes highlighting
and other styles that would result in unreadable text (due to not enough
contrast with the background color), and if the `help` builtin detects
that the best web browser to use is Lynx, it instructs it to use this
modified stylesheet.
2017-09-26 13:44:19 -05:00
Mahmoud Al-Qudsi
2b425ad221 Don't use xdg-open if running in terminal mode (i.e. no Xorg)
If the $DISPLAY environment variable is not set, xdg-open should not be
used to load the web browser. Just because it is installed does not mean
that the user exclusively runs in an X session.

Needed for Lynx detection to work around #4170
2017-09-26 13:42:40 -05:00
Mahmoud Al-Qudsi
c40188e40e Since cwd is a path, use PATH_MAX and not NAME_MAX 2017-09-26 10:00:23 -05:00
Mahmoud Al-Qudsi
b495c68f28 Fix non-standard getcwd() invocation
The POSIX standard specifies that a buffer should be supplied to
getcwd(), not doing so is undefined (or rather, platform-defined)
behavior. This was causing the getcwd errors on illumos (though not seen
on Solaris 11) reported in #3340

Closes #3340
2017-09-26 09:53:36 -05:00