Commit graph

5469 commits

Author SHA1 Message Date
Fabian Homborg
7e56d6385e History docs: Move descriptions to the corresponding options
This should clarify `--delete`s behavior without `--prefix` or
`--contains` a bit.

Fixes #3054.
2016-06-20 18:24:56 -07:00
Fahri Cihan Demirci
db0176b884 Add Purge Subcommand Completion for Apt (#3097) 2016-06-20 18:23:12 -07:00
Fabian Homborg
f63f6e54fa Make string match -rnv work
Fixes #3098.
2016-06-20 18:21:45 -07:00
Jens Fredskov
7cf6ef675a correct __fish_contains_opts to __fish_contains_opt (#3102)
Completion throws and error about the command `__fish_contains_opts` beings unknown. It seems to be a simple typo, as all other completions use `__fish_contains_opt`
2016-06-20 18:16:10 -07:00
Fabian Homborg
29664c42a0 git completions: Ignore stderr everywhere
This allows us to run git commands outside of a git repo.

Fixes #3114.
2016-06-20 18:11:26 -07:00
Fabian Homborg
8dc4b0d4b2 Merge pull request #3123 from moverest/completion
Extend autocompletion support
2016-06-20 18:05:01 -07:00
Boris Aranovich
cb74f0f60e Refine reading ssh_config (#3146)
https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5
1. It is possible to add multiple whitespace characters between the keyword (i.e. Host) and the argument(s).
2. It is allowed to have a single = and whitespace between the keyword and the argument(s).
3. It is possible to add multiple host names under a single Host directive by spacing the names apart.

1. and 3. are actual conventions that we use in our team, and I couldn't get auto-complete working for fish without this modification.

Modification explained:
a. The space between Host(?:name)? and the \w.* was replaced by (?:\s+|\s*=\s*) to match any sequence of whitespace characters, or optional whitespaces with a single =, per spec.
b. Result of first replacement is piped through another string replace to switch duplicate whitespace characters to a single space, and then piped to be split by that space. This allows specifying several aliases or host names in a single Host/Hostname definition, also per spec.
2016-06-20 17:06:45 -07:00
Kurtis Rader
d8dd718695 remove unset vars from the environment
Remove vars from the environment that are no longer set. Simplify the code by
removing an unnecessary loop. Add some tests.

Fixes #3124
2016-06-20 17:00:36 -07:00
Kurtis Rader
4424909801 simplify, and fix, setting the current locale
Fix test setup bogosities. Specifically, they weren't hermetic with respect to
locale env vars.

Rewrite the handling of locale vars to simplify the code and make it more like
the pattern most programs employ.

Fixes #3110
2016-06-20 16:54:34 -07:00
Kurtis Rader
a243580cfa tty driver ignore lnext (\cV) and werase (\cW)
Configure the tty driver to ignore the lnext (\cV) and werase (\cW) characters
so they can be bound to fish functions.

Correct the `fish_key_bindings` program to initialize the tty in the same
manner as the `fish` program.

Fixes #3064
2016-06-20 14:28:14 -07:00
Aaron Gyes
693d6879d3 Travis: restore clang with trusty & included clang
Upgraded to using Tavis trusty dist (from precise)

Ubuntu's clang is only 3.4 though.

For fancy address, thread-sanitizer stuff, easier to do on OS X.
We can use the clang that comes with xcode 8 beta.
2016-06-20 03:27:32 -07:00
Aaron Gyes
ad7e9a8d56 Travis: clang 3.5.0 on Linux
https://docs.travis-ci.com/user/trusty-ci-environment

all trusty images have sudo, and actually it is required
to use this new Travis environment per docs. This makes
it actually do it. Clang is 3.5 now.
2016-06-20 03:24:23 -07:00
Fabian Homborg
d0fdc82fdf Tests: Add fish_mode_prompt to except_prompt
Without this, the interactive tests fail when they receive a mode_prompt
in vi-mode.
2016-06-20 11:30:10 +02:00
Kurtis Rader
82c56bc64b deal with broken ttys on MS Windows
The tty device timestamps on MS Windows aren't usable because they're always
the current time. So fish can't use them to decide if the entire prompt needs
to be repainted.

Fixes #2859
2016-06-19 22:05:01 -07:00
Kurtis Rader
098f6d01c4 enhance the key_reader program
The original `key_reader` program was useful but didn't do much that `xxd`
or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by
default. This change adds features that make it superior to those programs
for decoding interactive key presses and makes it a first-class citizen
like the `fish_indent` program that is always available.

Fixes #2991
2016-06-19 19:43:45 -07:00
Fabian Homborg
fcbeddc3eb Remove $__fish_vi_mode
This makes fish_mode_prompt rely on $fish_key_bindings instead.

fish_bind_mode is also set in default mode (only always "default"), so
it can't be used as the indicator.

Closes #3067.

(cherry picked from commit 8ab980b793)
2016-06-06 22:21:52 +08:00
David Adam
216a45edee Bump version for VERSION 2016-05-20 22:48:00 +00:00
David Adam
7828f2303a osx/config.h: update to match current configure output 2016-05-20 22:44:47 +00:00
David Adam
245be2c2e4 CHANGELOG: update for 2.3.0 2016-05-20 22:37:30 +00:00
Jorge Bucaran
14b953e414 Add missing color definitions to __fish_init_1_50_0 reset. (#2987)
* Add missing color definitions to __fish_init_1_50_0 reset.

The values where determined by inspecting the values of:

* fish_color_end
* fish_color_user
* fish_color_host

after resetting the color theme via fish_config.

* Add documentation for fish_color_user and fish_color_host.

(cherry picked from commit 08c29727e0)
2016-05-20 21:02:56 +00:00
ridiculousfish
ade6ebf522 Update docs to reflect new if/while condtion chaining
Documents new behavior in #1428

Cherry picked from 30ea7cc3f8
2016-05-19 13:03:06 -07:00
ridiculousfish
768277a312 Remove the errant newline in __fish_cancel_commandline again
(cherry picked from commit 149e601743)
2016-05-13 23:19:53 +01:00
Daniel Bergmann
c53951b9b3 Add tags to completion list for git show. (#2998)
(cherry picked from commit ac47100a7d)
2016-05-08 14:07:32 +02:00
Fabian Homborg
46b819a265 docs: Mention cartesian product in variable-expansion section
See #3002.

(cherry picked from commit 1d101ef3d0)
2016-05-08 14:07:32 +02:00
[Redacted]
4d1e77fcae Added completions for rmmod (#3007)
(cherry picked from commit 59c8800c4d)
2016-05-08 14:07:32 +02:00
Vladimír Čunát
4efd0dfd65 docs: fix location of generated_completions (#3010)
(cherry picked from commit 100eef4e42)
2016-05-08 14:07:32 +02:00
Alexey Alekhin
c1e15ef084 FAQ: Synchronise code to add fish to /etc/shells with README
(cherry picked from commit 01e5ca5c96)

Signed-off-by: David Adam <zanchey@ucc.gu.uwa.edu.au>
2016-05-07 07:57:03 +01:00
Elis Axelsson
8ec81393a3 Change abbr to allow non-letter keys (#2996)
(cherry picked from commit 1c6f6df2b3)
2016-05-06 16:17:01 +02:00
David Adam
49838c768d bump version for 2.3b2 2016-05-05 06:02:57 +08:00
David Adam
862e0127f6 CHANGELOG: update for 2.3b2 2016-05-05 06:02:52 +08:00
Kurtis Rader
1cd4731c2d don't use colors when writing the ^C indicator
There was an extended discussion in https://github.com/fish-shell/fish-shell/issues/2904 about using a bright yellow background to make the cancelled command indicator, ^C, standout. The upshot was that standout (i.e., reversing fg/bg colors) mode should be used until themes are agumented with proper support for background colors and special characters.

(cherry picked from commit a897ef0025)
2016-04-30 12:31:57 -07:00
Fabian Homborg
05a432da32 Remove using_command from netctl completions
This allows `; and netctl` to work.

First step towards #2705.
2016-04-30 16:51:49 +02:00
Fabian Homborg
404ab5e9ab git completion: Allow optional "+" for push
This signifies a force-push.

To avoid cluttering, only complete branches if a + is already given.

Fixes #2879.

(cherry picked from commit fde26d4049)
2016-04-30 16:35:14 +02:00
Fabian Homborg
901652d5c3 Add repository/refspec completion to git
A few commands (fetch, pull and push at least) take a "repository" (aka
"remote") and then a "refspec" (we currently do branches here).

Fixes #2525 (seems that man is still alive)

(cherry picked from commit b32bf22616)
2016-04-30 16:35:14 +02:00
Kurtis Rader
4bb805b5fe document new fish_realpath builtin 2016-04-29 21:47:43 -07:00
Kurtis Rader
52731c480c provide a realpath implementation
Not all distros have a `realpath` command. Provide a function that uses the
real command if available else use the fish builtin.

Fixes #2932

(cherry picked from commit 6c329e8a83)
2016-04-29 21:30:26 -07:00
Kurtis Rader
f44ef3ad3f fix bind unit tests
In my rush to get the fix for the wrong default Vi mode escape delay merged
(commit 3e24ae80b3) I neglected to update the
unit test. This change corrects that oversight.

Cherry-picked from 5092904ea3
2016-04-29 15:55:39 -07:00
Kurtis Rader
54319435f4 clarify fish_vi_mode deprecation warning
Also, correct the Vi mode default escape timeout. I intended it to be 100 ms
in my previous change but it ended up 10 ms which is far too short. A 10 ms
delay will continue to cause problems for people running fish inside `screen`,
`tmux`, or over high latency connections.

Cherry-picked from 3e24ae80b3
2016-04-29 15:52:10 -07:00
ridiculousfish
8e19c82e09 Issue a \r in fish_title, except when executing it for the prompt
fish_title currently outputs some escaped text, which can confuse
the line driver (#2453). Issue a carriage return so the line driver
knows we are at the beginning of the line, unless we are writing
the title as part of the prompt. In that case, we may have text from
the previous command still on the line and we don't want to move the
cursor.

Fixes #2453
2016-04-29 12:33:06 -07:00
Sanne Wouda
09bb713989 git takes --help even when it needs a command (#2984)
`git --help` is a valid command and fish should complete it as such
2016-04-29 12:59:04 +02:00
Fabian Homborg
6466ffe82d git completion: Only show unmerged branches for cherry-pick 2016-04-29 12:59:04 +02:00
Kurtis Rader
ce41e3468e add way to comment/uncomment a command
Fixes #2375

(cherry picked from commit 2f8d0e9aba)
2016-04-28 14:58:15 +08:00
David Adam
75064ed786 fish.spec: hostname dependency for openSUSE
As discussed in
ed4b78918a

[ci skip]
2016-04-28 08:20:58 +08:00
Michael Steed
5f4a77a324 Update usage of pcre2_substitute() for pcre2-10.21
- Set PCRE2_SUBSTITUTE_OVERFLOW_LENGTH to get the required buffer length
  from pcre2 instead of guessing
- Set PCRE2_SUBSTITUTE_EXTENDED to enable extra goodies in the
  replacement string

(cherry picked from commit c2f9d60eb1)
2016-04-27 21:50:18 +08:00
Michael Steed
8a940a2ee7 configure: require at least pcre2-10.21
(cherry picked from commit c4c7983497)
2016-04-27 21:50:18 +08:00
David Adam
d5797c5439 env_universal_common.cpp: pass correct flag to fcntl
Closes #2955.
2016-04-27 20:34:14 +08:00
Fabian Homborg
d0fdc80725 Make busctl completions useful
- More accurate

- Fast enough to be usable (previously, this would sometimes take a few
  seconds)

- A bit smaller
2016-04-27 14:17:29 +02:00
David Adam
375bef4443 configure: enable GNU/POSIX extensions by default
Reenable mkostemp on Cygwin. Work on #2952.
2016-04-21 22:34:37 +08:00
David Adam
0e7ab7a7d0 configure: work harder to ensure mkostemp usability
Closes #2952.
2016-04-21 22:33:32 +08:00
ridiculousfish
413ac86da2 Don't ship libpcre2.a in the OS X installer package
This fix prevents the copy-to-install-path phase for this target
in Xcode by setting the SKIP_INSTALL flag.
2016-04-21 01:17:50 -07:00