Commit graph

1397 commits

Author SHA1 Message Date
Jaime Marquínez Ferrándiz
61fd8b9861 history.fish: Fix input handling
Pass the input to 'string', it was accidentally removed in fcdc6a48c0.
2016-03-02 14:26:10 +01:00
Fabian Homborg
5446841069 Ditch __fish_sgrep in obnam completions 2016-02-28 18:07:57 +01:00
Fabian Homborg
fb5a8a089e Use command which in type
Turns out some shells will alias which to be something function-aware,
but doing this on fish would blow up because it would call type which
would then call which which would then call type....

Fixes #2775
2016-02-28 12:12:13 +01:00
Kevin Ballard
d8a497434f Rewrite __fish_urlencode to not encode valid characters
Much better to only encode the characters that are not URL-safe. This
also doesn't involve any forking, and it even handles newlines and NULs
in the input.
2016-02-27 00:14:52 -08:00
Kevin Ballard
2bb7c587f4 Skip over /etc/paths.d entries that don't exist
I had an old /etc/paths.d/TeX file that listed a path /usr/texbin that
doesn't exist anymore. This was causing the `set PATH` to print a
warning.
2016-02-26 20:26:24 -08:00
Kevin Ballard
2187c0a84b Standardize indentation in config.fish 2016-02-26 20:22:59 -08:00
Fabian Homborg
c1b384e5d3 Add functions and configuration snippets hierarchy
This allows "vendors" (i.e. third-party upstreams interested in
supporting fish) to add auto-loaded functions and eager-loaded
configuration "snippets", while still allowing both the user and the administrator to
fully override all of that.

This has been inspired by systemd's configuration hierarchy, and implements a similar scheme
whereby files with the same name in higher-ranking directories override files in lower-ranking ones.

Fixes #1956
2016-02-26 12:14:55 +01:00
Fabian Weisshaar
a805d401b8 add completions for diskutil (osx) 2016-02-23 13:54:46 +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
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
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
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
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
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
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
Fabian Homborg
adc3b0e122 eselect completion: Silence eselect php output
The version with the features we use isn't in gentoo stable yet and
older versions print a very ugly warning.
2016-02-04 23:31:32 +01:00
Elis Axelsson
29d06760bc Update eselect completions to work for the php-module
refs #1131
2016-02-04 23:30:06 +01:00
ridiculousfish
25ad8866c9 Merge change for lengthened and configurable escape key timeout 2016-02-04 13:56:49 -08:00
Kurtis Rader
2646d51a0b change default escape timeout
This changes the default escape timeout for the default keybindings (emacs
mode) to 300ms and the default for vi keybindings to 10ms.

I couldn't resist fixing a few nits in the fish_vi_key_bindings.fish file
since I was touching it to set the escape timeout.
2016-02-04 13:39:19 -08:00
Fabian Homborg
b908d0b89b Another stringification (__fish_complete_command) 2016-02-04 13:53:55 +01:00
Fabian Homborg
cadb5d51ea Replace tr invocations 2016-02-03 23:47:46 +01:00
Fabian Homborg
fcdc6a48c0 Stringify history.fish 2016-02-03 23:45:54 +01:00
Fabian Homborg
16aa0b93e9 Stringify __fish_complete_lpr_option 2016-02-03 23:26:41 +01:00
Fabian Homborg
158ea98189 Replace uses of expr with math/string 2016-02-03 23:23:59 +01:00
Fabian Homborg
962f9914c6 Stringify trap 2016-02-03 23:23:04 +01:00
Fabian Homborg
1688b2384f pacman: Stringify 2016-02-02 09:48:55 +01:00
Fabian Homborg
0c94c2b9e8 pacman: Remove outdated "$argument" hack
This doesn't seem to speed up anything.
2016-02-02 09:48:26 +01:00
Fabian Homborg
d3f6c8a694 pacman: Improve --files completion
Missed one option and the option-as-command-hack
2016-02-02 09:47:44 +01:00
Fabian Homborg
e086e27f98 Update pacman/makepkg completions for pacman 5
Some new options, one new operation - "--files".
2016-02-02 09:23:23 +01:00
Dan Martinez
c7ba446c23 Add support for brew's desc subcommand 2016-01-21 15:01:18 -08:00
Fabian Homborg
4b2495f28f Skip greeting on empty variable
It used to be that way and we recommend `set fish_greeting` (i.e. set to
empty) in the docs - possibly since we check if the variable is defined
on upgrade.
2016-01-18 21:56:59 +01:00
ridiculousfish
d7f38a0802 Tweak language and styling of background color text in fish_config 2016-01-14 23:16:34 -08:00
Kurtis Rader
a77ce393ba respond to feedback 2016-01-14 22:34:25 -08:00
Kurtis Rader
f8ed1d182e improve set_color and theme color documentation
This is meant to make it clear that fish cannot control the terminal
window background color. It also augments the set_color documentation to
describe how it decides which color the terminal can display.

Resolves #2421.
Resolves #2184.
2016-01-14 22:34:25 -08:00
Fabian Homborg
68fcb790b0 Add all boolean values to pacmd completion
PA accepts "0", "false" and "off" (among others) for false also for suspend-*.
2016-01-14 23:33:31 +01:00
Fabian Homborg
8db1a5fae7 Add completions for Pulseaudio's pacmd
To implement this mostly as a wrapper around pactl, we add the list of
commands for this to that. It's 90% the same anyway. (This means that
`pactl suspend ` will complete files instead of commands like `pactl
banana ` would, but neither is correct)
2016-01-14 23:31:17 +01:00
Fabian Homborg
6bf70c86d2 Only complete unloaded modules for pactl load-module
This now officially does more than the official bash completion!
2016-01-14 22:36:50 +01:00
Fabian Homborg
b7d98fa873 Add profiles and ports completion to pactl
This is now on par with the official bash completions.
2016-01-14 22:21:50 +01:00
Fabian Homborg
daafe4ef37 Add completion for pulseaudio's pactl 2016-01-14 21:21:54 +01:00
Fabian Homborg
ed1919b266 abbr: Ensure we don't split on "=" if the given separator is " "
This fails on e.g. an abbr that uses `env a=b`, like the included test demonstrates.

Unfortunately it decreases the speed again (2s vs 2.2s vs 4s original),
but correctness is more important.
2016-01-14 16:58:29 +01:00
Fabian Homborg
ac545940de Optimize and modernize abbr
- Replace __fish_abbr_escape with `string escape`

- Don't double-parse the key

- Replace IFS magic with string

Together, this seems to speed it up by a factor of about 2.
2016-01-14 16:57:07 +01:00
Fabian Homborg
7a8cbcda06 Disable 24bit-color on neovim's terminal
Unfortunately, nvim will, even when running in a terminal that supports
it, swallow the sequences whole, rendering the displayed text _white_.

This means falling back to 256 colors is the lesser evil as at least a
blue-ish color will display as blue while a red-ish will be red, instead
of both showing white.

nvim's behavior does _not_ change depending on
$NVIM_TUI_ENABLE_TRUE_COLOR or any other option I could find and neovim-qt
exhibits the same behavior.

Fixes #2600.
2016-01-14 15:17:49 +01:00
Fabian Homborg
8e79da3b2d Fix typos
Fixes #2673.
2016-01-12 00:08:41 +01:00