Commit Graph

7340 Commits

Author SHA1 Message Date
Mahmoud Al-Qudsi
0836a5b9b4 Silence directory change messages when calling gmake from BSD make
These messages are automatically generated as if `-w` were specified
at the gmake command line. The `--no-print-directory` option supresses
these messages.

(cherry picked from commit b7f1103088)
2017-10-12 12:51:26 -05:00
Mahmoud Al-Qudsi
30a74dcf2d Update BSDMakefile to force build of targets
.DEFAULT or .DONE cannot be set as .PHONY so this hack was required.

(cherry picked from commit 40a90f1b2f)
2017-10-12 12:51:26 -05:00
Mahmoud Al-Qudsi
03366333b2 Include flatpak improvements in Changelog for 2.7.0b1 2017-10-11 06:27:15 +02:00
Mahmoud Al-Qudsi
56abb1750b Coalesce string trim and string match in flatpak completions
(cherry picked from commit 1a3adf086d)
2017-10-11 06:25:25 +02:00
Mahmoud Al-Qudsi
f6bb384a46 Update flatpak completions to work with latest flatpak
Closes #4456

(cherry picked from commit 21473b20ec)
2017-10-11 06:25:25 +02:00
Amitava Bhattacharyya
7bacc57e4f 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?"
(cherry picked from commit 48797974d3)
2017-10-10 17:04:45 +08:00
Mahmoud Al-Qudsi
04c69932e2 Add more test examples, including expression negation
Closes #4383

(cherry picked from commit ff66d2f3c1)
2017-10-08 02:07:49 +02:00
Mahmoud Al-Qudsi
d4ed2ca447 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.

(cherry picked from commit b61c4f1cbc)
2017-10-05 13:56:24 +02:00
Mahmoud Al-Qudsi
429bdce4f1 Document reasons for commmand name replacement in pip2/3 completions 2017-10-05 13:32:56 +02:00
Mahmoud Al-Qudsi
de45232a37 Fix copy-and-paste pip3 -> pip2 typo
Thanks @floam. See #4448

(cherry picked from commit 78fe53406e)
2017-10-05 13:28:35 +02:00
Mahmoud Al-Qudsi
d74d3f2ca4 Use string replace instead of sed with better regex for pip completions 2017-10-05 13:21:26 +02:00
Mahmoud Al-Qudsi
0c21efea55 fixup! Force correct names for pip2/pip3 command in completions
(cherry picked from commit af12bcb117)
2017-10-05 13:12:15 +02:00
Mahmoud Al-Qudsi
3f9273cc32 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:07:11 +02:00
Aaron Gyes
df6a86913c pip completions: use builtin source rather than eval function. 2017-10-04 21:56:28 -07:00
Cristian Prieto
835a40bf56 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:16:12 -07:00
PenegalECI
2193ddbb6b Globally improved french translations (#4372)
* Globally improved french translations

* Corrected translations following comments
2017-10-01 21:22:41 -07:00
Aaron Gyes
417be25c69 Fix export returning 1 on success
Fixes #4435

(cherry picked from commit 1ef310c3a8)
2017-10-01 21:46:33 +08:00
Aaron Gyes
7b5f1f018b Revert "Make italics/dim work on MacOS"
This reverts commit c6fe65bad3.
2017-09-29 15:42:11 -07:00
Aaron Gyes
73b4efb65b install linx.lss with Xcode project 2017-09-29 15:13:14 -07:00
Aaron Gyes
c6fe65bad3 Make italics/dim work on MacOS
Work around ancient terminfo on MacOS by hard-coding the correct escapes.
Fixes #4436.
2017-09-29 15:12:52 -07:00
Mahmoud Al-Qudsi
fb252e6e10 CHANGELOG.md: kdeconnect-cli, not kdecomplete 2017-09-26 15:52:32 -05:00
Mahmoud Al-Qudsi
e031d91c19 fixup! Updated changelog with info about all new and updated completions since 2.6.0 2017-09-26 15:49:59 -05:00
Mahmoud Al-Qudsi
6366a67c21 fixup! Updated changelog with info about all new and updated completions since 2.6.0 2017-09-26 15:36:37 -05:00
Mahmoud Al-Qudsi
281be31eb3 Updated changelog with info about all new and updated completions since 2.6.0 2017-09-26 15:21:01 -05:00
Mahmoud Al-Qudsi
8fcbe1a105 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

(cherry picked from commit 338311af1e)
2017-09-26 15:00:32 -05:00
Mahmoud Al-Qudsi
8692489326 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.

(cherry picked from commit 8b858f2fcc)
2017-09-26 15:00:18 -05:00
Mahmoud Al-Qudsi
c7771bb0dd 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

(cherry picked from commit 2b425ad221)
2017-09-26 14:52:18 -05:00
Mahmoud Al-Qudsi
e1281754fe Since cwd is a path, use PATH_MAX and not NAME_MAX
(cherry picked from commit c40188e40e)
2017-09-26 10:00:45 -05:00
Mahmoud Al-Qudsi
c8425f832c 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

(cherry picked from commit b495c68f28)
2017-09-26 09:54:36 -05:00
Mahmoud Al-Qudsi
67e3bac583 Speed up __fish_print_hostnames for faster completions
Thanks to @ThomasAH, as per #4378. Tested on many platforms (OS X,
FreeBSD, Linux, and Solaris). Works with IPv4 and IPv6 as well as
host names and loopback addresses.

(cherry picked from commit 3b3bcc998e)
2017-09-26 09:27:58 -05:00
Mahmoud Al-Qudsi
73282c9c4d Ignore muparser src directory
When switching between fish3 and fish2 for development, the muparser
directory is always left over and doesn't represent anything that
concerns fish2.
2017-09-26 08:58:30 -05:00
Mahmoud Al-Qudsi
fc80505ecc Support colored ls output on Solaris 11
Closes #1223

(cherry picked from commit 6513db35c1)
2017-09-26 08:56:17 -05:00
Mahmoud Al-Qudsi
d1472532d3 Support building on Solaris 11
Took care of remaining issues preventing fish from building on Solaris.
Mainly caused by some assumptions that certain defines are POSIX when
they are not (`NAME_MAX`).

Moved `NAME_MAX` defines to common.h - for some reason, it was being
defined in a cpp file (`env_universal_common.cpp`) even though it is used
in multiple source files.

Now compiles on Solaris 11 with GNU Make. Still some warnings because
fish was written with GNU getopt in mind and the Solaris version doesn't
use `const char *` but rather just `char *` for getopt values, but it
builds nevertheless.

Assuming this closes #3340

(cherry picked from commit ffebe74885)
2017-09-26 08:29:14 -05:00
Mahmoud Al-Qudsi
01c5f6eaa8 Removed gmake disclaimer from BSD build instructions
After cc35241a6e, BSD users can just call
make normally and have it redirect the build/install/test/whatever to
GNU Make.

(cherry picked from commit 3604522bf2)
2017-09-24 15:07:50 -05:00
Mahmoud Al-Qudsi
19b89983a1 Automatically pass build through to gmake on BSD
Smarter BSDmakefile that automatically calls gmake to build the targets,
even including `-j` if provided. README.md can be simplified to remove
`gmake` references from build instructions for BSD users.

(cherry picked from commit cc35241a6e)
2017-09-24 15:07:50 -05:00
Mahmoud Al-Qudsi
92a6906e6a Update README to include syntax highlighting
Use bash syntax highlighting to make comments appear in gray
(cherry picked from commit 22a4ead36e)
2017-09-24 14:03:35 -05:00
Mahmoud Al-Qudsi
661d96c336 Make instructions after make install more uniformly formatted
Fixed indentation and quoting to match between all three commands
printed after `make install`

(cherry picked from commit 50f8ff1bc5)
2017-09-24 13:59:51 -05:00
Mahmoud Al-Qudsi
93d352b809 Work around WSL access(2) EINVAL bug
See Microsoft/BashOnWindows#2522, Microsoft/BashOnWindows#2448

(cherry picked from commit 56c041b889)
2017-09-24 13:45:54 -05:00
David Adam
bcd9c39509 Rename FISH_HISTORY to fish_history
Work on #4414.

(cherry picked and edited from commit
472e186c2b)
2017-09-24 14:30:50 +08:00
ridiculousfish
43d0016125 Correct prefix length calculation in completion measurement
A completion may have zero length; in this case the length of the
prefix was omitted and the completion was not visible. Correct the
calculation to account for zero-width completions.

Fixes #4424
2017-09-23 13:08:06 -07:00
Mahmoud Al-Qudsi
0d93125664 Merge pull request #4421 from krader1961/consistent-unicode
Use \uXXXX consistently for unicode code points
(cherry picked from commit 6b2e84be0e)

Backporting to 2.7.0 branch just to try and keep changes between master
and this branch as minimal as possible.
2017-09-22 21:19:11 -05:00
Mahmoud Al-Qudsi
ace7903bc3 Make build code snippets copy-and-paste friendly
(cherry picked from commit 46cf8c6bb7)
2017-09-16 15:52:08 -05:00
Mahmoud Al-Qudsi
f14fde2373 Use inline code for paths and commands
(cherry picked from commit 14e23749a6)
2017-09-16 15:52:07 -05:00
Mahmoud Al-Qudsi
4d31a13fb2 Lined up instructions output in make install
(cherry picked from commit eac8158110)
2017-09-16 15:38:12 -05:00
Ed Brannin
3a2b836f0e Fix smurf_color variable name
(cherry picked from commit 9ac7da28bd)
2017-09-16 07:03:14 +08:00
Mahmoud Al-Qudsi
215f731498 fixup! Include make [test|all|install] in BSDmakefile 2017-09-14 14:35:38 -05:00
Mahmoud Al-Qudsi
0d8caeec34 Include make [test|all|install] in BSDmakefile
If a build takes a long time, it's entirely possible to run `gmake` and
then forget to use GNU make and run `make install` after.
2017-09-14 14:31:45 -05:00
Mahmoud Al-Qudsi
d7628a4d29 Emit error and GNU Make directions when compiled with BSD Make
On BSD platforms, a BSD-specific BSDmakefile is searched for and used
before any generic Makefile. We can use this to emit an informational
message directing the user to use GNU Make instead of relying on the
user's recognizing of random build failures on syntax errors as a sign
to switch to GNU Make.

(Random fact: this same trick also applies to GNU Make, which searches
for a GNUmakefile before using Makefile)
2017-09-14 14:31:45 -05:00
Mahmoud Al-Qudsi
9d7a0de4c1 Squashed commit of the following:
commit e07f1d59c06094846db8ce59f65d4790b222fffa
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Sun Sep 10 21:54:45 2017 -0500

    Use git branch and git branch --remote for checkout completions

commit 9e1632236be065e051e306b11082ca4e9c7a0ee1
Author: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Date:   Sun Sep 10 11:27:30 2017 -0500

    Correct classification of remote and local branches

    To prevent any breakage, no changes were made to __fish_git_branches,
    instead its output was filtered into __fish_git_remote_branches and
    __fish_git_local_branches, the two of which are now used to provide
    completions for "git checkout ..."

    Fixes #4395

Closes #4396
2017-09-14 13:46:03 -05:00
Mahmoud Al-Qudsi
7113cc33f1 Make s3cmd completions compatible with python3 environment
It seems that under python3, s3cmd emits its output as a long list (like
ls -l) with or without the --long parameter to "s3cmd ls s3://...".

This patch includes only s3://* paths from that output as completions.
2017-09-14 13:44:31 -05:00