Commit Graph

1419 Commits

Author SHA1 Message Date
Josef Gajdusek
0eb3fd6b3f Make modprobe completion more precise
Only match loaded modules when -r is specified.

Also adds /lib/modules/(uname -r)/misc to the search path.
This directory is used by Gentoo for package-provided modules
(such as the app-emulation/virtualbox-modules)
2016-03-28 14:38:19 +02:00
Josef Gajdusek
6663c73eb0 Fix typos: ingnore->ignore 2016-03-28 14:38:19 +02:00
Fabian Homborg
7accadc33f Only read .fish files in the snippets directories
This would allow us to add a README and allows users to easily disable
something temporarily.
2016-03-26 19:20:40 +01:00
Bogdan Sinitsyn
516695ff21 add yaourt completions 2016-03-24 16:17:10 +01:00
Kurtis Rader
9d2b53450a limit size of cd history to 25 directories
The existing implementation grows the $dirprev array without bounds. Besides
causing what would appear to be a memory leak it also makes the nextd and
prevd commands more expensive than they need to be. It also makes it harder to
create a useful "menu" cd command.

In addition to implementing a reasonable limit on the size of the $dirprev
array I've reformatted the code using fish_indent.

Update the documentation to include mentions of the $dirprev and $dirnext
variables as well as the limit on how much directory history is kept.

Fixes 2836
2016-03-23 13:36:00 -07:00
Fabian Homborg
a81bd697a8 Make reading ssh files case-insensitive
Fixes #2843
2016-03-22 11:09:36 +01:00
Federico Ferri
168a156e58 implement swap-selection-start-stop function
The swap-selection-start-stop function goes to the other end of the highlighted text, the equivalent of `o' for vim visual mode.

Add binding to the swap-selection-start-stop function, `o' when in visual
mode.

Document swap-selection-start-stop, begin-selection, end-selection, kill-selection.
2016-03-20 19:22:04 -07:00
Federico Ferri
879ee61a30 fix w, e (with a trick to cope with big-words) 2016-03-20 19:17:15 -07:00
Kurtis Rader
fb0921249f add \r equivalent binding
Add a binding that was overlooked by commit
d65c63322e.

Fixes #2834
2016-03-20 12:08:46 -07:00
Cody Frazer
1828def866 Add --no-index option completion for git diff 2016-03-20 10:10:51 -05:00
Fabian Homborg
dedc7f6f03 Fix acpi check in nim prompt 2016-03-20 12:20:39 +01:00
Fabian Homborg
de0349399c robbyrussell prompt: Check for git/hg existence
Fixes #2826
2016-03-20 12:17:00 +01:00
Owen Richardson
9f0417b587 make alt-L output respect multi-line prompts
Fixes #718
2016-03-18 15:53:29 -07:00
lordlycastle
540bdfcb02 date and uniq completions for OS X. 2016-03-12 13:57:37 +01:00
Fabian Homborg
6288f89bf9 Move code in etc/config.fish to share/config.fish
instead add a bit of information on how fish's configuration works for
the admin to etc/config.fish.

This means that fish is fully functional without /etc, which might be nice for "stateless" systems.
2016-03-09 13:07:04 +01:00
David Adam
f4c14b69a2 Update dpkg completions to complete commonly used options
Closes #2798.
2016-03-06 21:29:09 +08:00
ridiculousfish
e3968ba872 Remove "w/o Background Color" text from Set Theme button in fish_config
This is important information but the Set button is the wrong place to
put it.
2016-03-02 15:02:28 -08:00
Fabian Homborg
0e8a8a7c80 Migrate abbrs from =-separated to space-separated
We silently upgrade existing abbreviations and change the separator when
saving.

This does not yet warn when the user is using the old syntax.

Resolves #2051
2016-03-02 10:59:12 -08:00
Fabian Homborg
fbd53f2da1 Check ssh's KnownhostsFiles in print_hostnames
These are an additional source of information

Thanks to @sysbot (#2313) for the inspiration.

This also stringifies the ssh_config reading
2016-03-02 15:16:52 +01:00
Fabian Homborg
65aeaab054 print_hostname: Avoid matches in fstab comments harder 2016-03-02 15:16:52 +01:00
Fabian Homborg
94c12d84e2 Stringify reading nfs in print_hostnames 2016-03-02 15:16:52 +01:00
Fabian Homborg
a5f5e6c1ef Ignore zero-ips in print_hostnames
This would be a lot of useless options for those who block via hosts.
2016-03-02 15:16:42 +01:00
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