Commit Graph

7309 Commits

Author SHA1 Message Date
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
David Adam
e7b0327e08 Makefile: unbreak uninstall target
Closes #4401.

(cherry picked from commit 00d44599c4)
2017-09-13 22:30:23 +08:00
Moritz
248de41d70 Add completions for git checkout --ours/--theirs (#4380)
* Add completions for git checkout --ours/--theirs

* Change description for `git checkout --ours/--theirs´ completions

(cherry picked from commit 6145b4a770)
2017-09-10 00:07:40 +08:00
Fabian Homborg
c5b7cc070e Fix string match -en error typo
Fixes #4386.
2017-09-08 16:31:41 +02:00
Fabian Homborg
bcdc6bb46b Clarify string match without -r partial match
Fixes #4388.
2017-09-08 16:26:43 +02:00
Fabian Homborg
32e65ed301 __fish_print_hostnames: Improve ssh known_hosts extraction
This now includes hosts with custom ports (and other hosts with the
same key), and explicitly excludes negated hosts, those with a
wildcard and those with an `@`-marker (e.g. `@revoked`)

It's also possibly a bit quicker because the ordering is better,
especially for files with many comments.
2017-09-07 16:24:36 +02:00
Fabian Homborg
57753c7303 __fish_print_hostnames: Use source instead of eval
Since this doesn't need stdin, we can skip eval's overhead.
2017-09-07 16:24:36 +02:00
Fabian Homborg
4437e8d8d6 __fish_print_hostnames: Use string replace -f
Saves one `string match` invocation.

Also removes a useless-use-of-cat.
2017-09-07 16:24:36 +02:00
Fabian Homborg
a4c03e3d7b ssh completions: Don't call __fish_print_hostnames twice
Saves about 40% of the time in this completion.
2017-09-07 16:24:36 +02:00
Fabian Homborg
2137e197fc git completions: Use modified files in the index for reset
Fixes #4329.

(cherry picked from commit c2f0a45d60)
2017-09-06 18:14:09 +08:00
Marcel Bischoff
7669c14274 Add basic ezjail-admin completion
(cherry picked from commit c0c33b3605)
2017-09-06 18:14:09 +08:00
Sam Yu
8eca1b0f13 Add repo completion for zypper (#4325)
* Add repo completion for zypper

* Replace sed with string in __fish_print_zypp_repos

* Move function into completion script

* Update zypper completion

add subcommand packages to __fish_zypper_repo_commands

(cherry picked from commit 81becc5f6b)
2017-09-06 18:14:09 +08:00
Fabian Homborg
908063d830 pacman-ish completions: Complete files for -Qo and -Qp
These were explicitly suppressed, which was wrong.
2017-09-05 16:55:06 +02:00
Benjamin Reitzammer
7d46c78082 add --force-with-lease completion for git push (#4368)
(cherry picked from commit 72244dee5b)
2017-09-01 23:31:03 +08:00
Alexey Alekhin
6368bebf12 Added sbt to the list of new completions
Also fixed sublist indentation and removed periods for formtatting consistency

(cherry picked from commit 75dd852340)
2017-09-01 23:30:59 +08:00
modula t. worm
3905c3355b Add completions for kdeconnect-cli (KDE Connect)
(cherry picked from commit fa3ca4dc3d)
2017-09-01 23:28:13 +08:00
Alexey Alekhin
d2c0cafeb7 Added sbt completions
(cherry picked from commit a43da0163a)
2017-09-01 23:28:13 +08:00
David Adam
737da73dd6 CONTRIBUTING.md: add note about dependencies
(cherry picked from commit 6cff72b226)
2017-09-01 23:28:13 +08:00
David Adam
f3142a7d91 README.md: rearrange and rewrite
Closes #2062

(cherry picked from commit 1183505695)
2017-09-01 23:26:50 +08:00
David Adam
e892c51b9c builtin_read: pickup MB_CUR_MAX from stdlib not xlocale
Fixes building on OpenBSD; work on #4184.

(cherry picked from commit 874a675e7f)
2017-08-28 12:24:42 +08:00
Mahmoud Al-Qudsi
e67ab57ca3 Fix uninitialized sigaction.sa_flags valgrind error
Valgrind warns that the sometimes uninitialized sigaction.sa_flags field
is sometimes used when passed to the signal handler.

This patch explicitly zeros out the sigaction.sa_flags field at creation
time.
2017-08-26 19:11:39 -05:00
David Adam
2d08da79e9 fish.spec: depend on system pcre2 libraries where available
(cherry picked from commit 1872fb4ea9)
2017-08-26 00:17:57 +08:00
Radek SPRTA
27d7feaf95 Fix apt subcommand option completions 2017-08-22 21:46:28 -07:00
David Adam
240bb25dbe Makefile: improve build reproducibilty by using LC_ALL=C in sort
Based on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=791648

(cherry picked from commit a311f49eda)
2017-08-19 23:11:53 +08:00
Phidica Veia
9a092ec015 Add vertical bar escape \| to documentation
Fixes #3794

(cherry picked from commit 84b59ae0be)
2017-08-19 15:23:58 +08:00
Mahmoud Al-Qudsi
f706081ea4 Replace custom s3cmd completion functions with standard __fish_* functions
Per the discussion with @faho in #4332, replaced some custom completion
state detection functions with standard __fish_* functions used in other
completion sources.
2017-08-18 11:55:16 -05:00
Mahmoud Al-Qudsi
7fe3cb7b29 fixup! Provide completions for s3cmd 2017-08-18 11:55:16 -05:00
Mahmoud Al-Qudsi
539acd9fc5 Provide completions for s3cmd
No longer auto-generated. Everything has been summarized. Supressing
file completions for initial command, providing list of valid initial
commands, filtering --options by subcommand.
2017-08-18 11:55:16 -05:00
Kurtis Rader
4b51e0f935 Fix typo in xdg-mime completion functions 2017-08-17 10:56:18 -07:00
MoritzKn
2761cf1bf5 Update xdg-mime helper
This will respect the `/usr/local/share/applications/` directory when
fetching mime infos.

Update xdg-mime helper to comply with the xdg spec.

This also makes sure __fish_print_xdg_applications_directories only prints
directories that exist.

Relevant specs:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
https://specifications.freedesktop.org/desktop-entry-spec/latest/ape.html
2017-08-17 10:55:42 -07:00
Kurtis Rader
bf3731bed4 Update changelog 2017-08-17 10:31:48 -07:00
Matus Goljer
3fe561bc93 Add completion for packages in update subcommand
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.
2017-08-17 10:28:14 -07:00