Commit Graph

7301 Commits

Author SHA1 Message Date
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
Georgy Yakovlev
277db1c1af Do not redirect to / in status.in/err test. 2017-08-17 10:27:36 -07:00
Kurtis Rader
dbb07bc3f5 fix set --show of semi-empty var
A semi-empty var is one with a single empty string element. The
`env_var_t::empty()` method returns true for such vars but we want
`set --show` to report that it has a single empty element.
2017-08-16 13:19:17 -07:00
David Adam
64eaf7ca5a Revert "Enable support for custom versioning"
This reverts functional changes in commit
ea3e9698df.

 * Annotated tags only should be used for releases - see #3572 for
   examples of where we want to use lightweight tags.

   See also git-tag(1) on the purpose of annotated and lightweight tags.

 * Version numbers are numbers and should not start with a branch name.

   The commit ID is embedded in the version and uniquely identifies the
   history. `fish --version` and `echo $FISH_VERSION` contain this
   information.

(cherry picked from commit dcb39bfa86)
2017-08-16 20:56:29 +08:00
Kurtis Rader
ea3e9698df Enable support for custom versioning
Now that we're working on the 3.0.0 major release it is more important
than ever that fish binaries built by developers have version strings
which clearly communicate where they came from.
2017-08-15 12:46:20 -07:00
Andrew Toskin
d407c22ee7 getopt isn't used anymore, and getent itself is optional.
getopt doesn't work very well in the BSDs, and getent has plenty of
fallbacks to replace it when it's not available.

<https://github.com/terrycloth/fish-shell/commit/
47a768ceeaef1d702624802d83338edbcc0f377c#commitcomment-23613921>
2017-08-14 18:02:55 -07:00
Mahmoud Al-Qudsi
4fd458900b Silence unused result warnings on newer compilers
Newer versions of GCC and Clang are not satisfied by a cast to void,
this fix is adapted from glibc's solution.

New wrapper function ignore_result should be used when a function with
explicit _unused_attribute_ wrapper is called whose result will not be
handled.
2017-08-14 18:02:42 -07:00
Andrew Toskin
3f6ed72a6b Really spell out the last of the required UNIX utilities.
Finishing the job started in Pull Request #4301

<https://github.com/fish-shell/fish-shell/pull/4301>

Thanks to @faho for filtering and sorting my giant list of detected
possible commands.

<https://github.com/fish-shell/fish-shell/issues/2062#issuecomment-321788080>
2017-08-14 18:02:04 -07:00
David Adam
3a6ec68a32 Revert "configure: check that errno is threadsafe"
This reverts commit ee15f1b987.

The test relies on undefined behaviour (checking for errno in the
absence of an error condition) and was broken on OpenBSD.

Closes #4184.
2017-08-14 18:01:51 -07:00