Commit Graph

5484 Commits

Author SHA1 Message Date
Aaron Gyes
c79ade9627 Send BEL to terminal to flash/beep while trying to complete something not completeable. 2016-02-25 08:18:27 +08:00
David Adam
d61e95e4f9 Makefile: enable maintainer mode for PCRE2
Closes #2469.
2016-02-24 18:14:41 +08:00
David Adam
68807f274e github: add issues template
[ci skip]
2016-02-24 16:06:26 +08:00
Fabian Weisshaar
a805d401b8 add completions for diskutil (osx) 2016-02-23 13:54:46 +01:00
Adam Dymitruk
2f52f073da Update index.hdr.in
simple grammar correction
2016-02-22 13:36:35 -08:00
Steve Stagg
c4cc9f9b8d add files for the fish logo as used for the fish-shell stickers 2016-02-22 12:27:39 -08:00
ridiculousfish
6c401bc587 Resume sorting completions from wildcard expansions
Ought to fix the wildcard expansion test on Linux
2016-02-22 03:37:39 -08:00
ridiculousfish
35160db268 Remove an unused variable 2016-02-22 03:37:03 -08:00
Michael Steed
5b0996fd80 make fish compatible with pcre2 10.21
pcre2_substitute() now sets the output buffer length to PCRE2_UNSET (~0)
if the output buffer is determined to be too small. This change keeps
track of the buffer size separately where pcre2 can't touch it.

A better fix would be to let pcre2 tell fish what size buffer it needs.
This can be done with PCRE2_SUBSTITUTE_OVERFLOW_LENGTH, but this
requires pcre2 10.21 or later (released January 12), which may be too
new to introduce as a dependency at this point.

Fixes #2743
2016-02-21 19:32:08 -08:00
Fabian Homborg
585c03db72 docs: Remove duplicate color variable listing 2016-02-21 13:58:15 +01:00
Aaron Gyes
613739ba07 Try to just see if grep is happy with --color=auto, or not, as the --help exit status varies in BSD vs. GNU. 2016-02-20 21:11:40 +01:00
ridiculousfish
947f659f96 Miscellaneous cleanup and dead code removal
Noticed by cppcheck
2016-02-19 15:45:31 -08:00
Fabian Homborg
8703c5bc00 Add fish_color_autosuggestion to docs
Fixes #2741.
2016-02-19 15:20:34 +01:00
ridiculousfish
43e1c0a2bf Remove some newly dead code
out_suggested_cdpath is no longer required from is_potential_path
2016-02-18 17:00:26 -08:00
ridiculousfish
99e18d9cef Remove autosuggest_suggest_special 2016-02-18 17:00:26 -08:00
ridiculousfish
718d9baead Implement the cd "unique hierarchy" autosuggestion in expand.cpp 2016-02-18 17:00:26 -08:00
ridiculousfish
e2f4584220 Teach tests about changes to special autosuggestions 2016-02-18 17:00:26 -08:00
ridiculousfish
4138073a2f Always env_set_pwd after chdir in the fish tests
This avoids confusion between getcwd() and $PWD
2016-02-18 17:00:26 -08:00
ridiculousfish
1907323afc Additional work on unifying cd autosuggestions with complete 2016-02-18 17:00:26 -08:00
ridiculousfish
c39b94949b Complete to take a pointer to output completions, not a mutable ref 2016-02-18 17:00:26 -08:00
ridiculousfish
31bc88d16f Migrate sort_and_prioritize to complete.cpp 2016-02-18 17:00:26 -08:00
ridiculousfish
5dbf40ca75 Switch autosuggest_suggest_special to returning a completion_t 2016-02-18 17:00:26 -08:00
ridiculousfish
2d68b25025 Early work towards moving the cd special autosuggestion into completions
This will simplify some code and make the cd autosuggestion smarter
2016-02-18 17:00:25 -08:00
Jak Wings
1767681f9a Fix the file URL for Terminal.app
* When using a UTF-8 locale, set locale to C temporarily in order to
  read one byte at a time.
* Use the builtin printf in a forward-compatible way. (GNU)
* Improve the readability of the code.
2016-02-16 21:49:58 -08:00
Aaron Gyes
0395c33982 Stop always returning STATUS_BUILTIN_ERROR on --merge. 2016-02-16 12:06:50 -08:00
Kurtis Rader
83d3c9fc04 fix flakey test
I've run this more than twenty times through Travis CI (by adding/removing
a comment line). Without this tweak the longest sequence seems to be
around six successful runs.
2016-02-16 11:40:40 -08:00
ridiculousfish
c184c1a81a Correctly handle --merge in the history.fish function
Previously --merge happened to work, but only because it was
smuggled in through the 'print' command
2016-02-16 11:34:36 -08:00
Aaron Gyes
31a617408f Fix typo 2016-02-16 05:14:33 -08:00
Aaron Gyes
a6565bbea8 Fix --merge hitting a case 2016-02-16 05:09:54 -08:00
ridiculousfish
81cdceddd3 Remove a debug() guarded by a surprising get_is_interactive
get_is_interactive can crash if proc_init has not been called.

Fixes #2280
2016-02-16 01:51:27 -08:00
ridiculousfish
5b506499c1 Use contains instead of string ==
Fix a few typos too
2016-02-15 13:27:00 -08:00
Andreas Nordal
62b76b26b4 Reinstate failglob behaviour for most commands
Expand globs to zero arguments (nullglob) only for set, for and count.

The warning about failing globs, and setting the accompanying $status,
now happens regardless of mode, interactive or not.

It is assumed that the above commands are the common cases where
nullglob behaviour is desirable.
More importantly, doing this with `set` is a real feature enabler,
since the resulting empty array can be passed on to any command.

The previous behaviour was actually all nullglob (since commit
cab115c8b9), but this was undocumented;
the failglob warning was still printed in interactive mode,
and the documentation was bragging about failglob behaviour.
2016-02-15 13:13:28 -08:00
Sunguk Lee
b72837a0f4 Improve __fish_print_users
Patch from `__make_users_completions` of killall command completion
2016-02-15 19:31:20 +09:00
Sunguk Lee
c4f702b7c4 Fix No command 'dscl' found error of killall command
`dscl` command have OSX system, to change `__fish_print_users`
2016-02-15 19:30:58 +09:00
Fabian Homborg
00cd01c89e Soften abbr-in-config.fish wording
This isn't as necessary anymore and having abbrs in config.fish is nice
for e.g. storing it in git.
2016-02-13 17:08:19 +01:00
Fabian Homborg
eb0d18add4 Rewrite abbr.fish to not call seq
This speeds up adding new abbrs by about 50 to 60% - from 2.3s to 1s for
100 abbrs.
2016-02-13 17:08:19 +01:00
Fabian Homborg
585bdf45c8 abbr: Bail early when the abbr already exists
This speeds up the common case of `abbr -a` calls in config.fish by
about 90% - from 900ms to 90ms for 100 calls.
2016-02-13 17:08:19 +01:00
Gordon Tyler
89206d8654 Fix user browser for help in Cygwin
Fixes the invocation of a user-specified browser by the `help` command on Cygwin.

- Use `cygstart` to launch the browser with escaped quotes to avoid problems with spaces in the path to the browser, (e.g. Program Files).
- Use `cygpath` to convert the base help dir to a Windows path before constructing the fie URL to pass to the browser.
2016-02-12 23:53:17 +01:00
Spittie
a00e26b109 Fix package listing for zypper
-E is only supported by BSD sed, switch to -r which is also supported
by GNU sed
2016-02-12 23:00:40 +01:00
David Adam
de17bdb130 travis: 'encrypt' notification configuration
The values for notification hooks remain available as comments, but this
prevents notifications from other repositories from automatically being
linked across to the official notification channels.
2016-02-11 23:06:21 +08:00
ridiculousfish
3345f5d0d0 Remove an unnecessary typecast 2016-02-10 11:38:05 -08:00
ridiculousfish
28837a8b30 Remove a stale comment about const 2016-02-10 11:37:26 -08:00
Jon Eyolfson
96e688ea91 Remove const from _wgetopt_internal's argv argument
The argv argument may be modified on calls to exchange within the function and should not be const qualified (it's not true from the caller's point of view).
2016-02-10 11:35:47 -08:00
Fabian Homborg
52f8707c3e Use string split in export.fish
It's a bit more explicit than replace.
2016-02-10 20:33:43 +01:00
Fabian Homborg
b6e058985b Fix "replacement string too large" error in pacman completion
Turns out we can skip using string altogether, thanks to the magic of
the cartesian product.
2016-02-10 15:35:01 +01:00
Andy Lutomirski
bc9e3c7546 fish_tests: Explicitly cast -2 to wchar_t
On arm, wchar_t is unsigned, and C++11 and newer disallow implicit
narrowing conversions inside braces.  Use an explicit conversion to
fix the build on GCC 6 and up, which defaults to C++11.
2016-02-08 13:48:28 -08:00
Fabian Homborg
57fcbecb41 Improve __fish_print_service_names
- Reuse systemd completion functions
- Remove a fork
- Fix #2715 - FreeBSD
- Comments
2016-02-07 14:53:12 +01:00
ridiculousfish
c4d0612e5c Factor expand_string into multiple stages
Breaks up a big ugly function into separable stages
with a common interface.
2016-02-05 01:22:46 -08:00
ridiculousfish
992dfcc4ce expand_string to return an enum instead of int 2016-02-05 00:00:38 -08:00
ridiculousfish
1e6492ef93 Bits of cleanup of expand_string
Remove some unnecessary variables, make some things not pointers
2016-02-04 23:57:21 -08:00