Wilke Schwiedop
8ae9b716a0
fix 'grep ... | sed'
2018-04-09 01:09:49 +02:00
Thom Chiovoloni
25169a44ed
Add alias -s/--save
, which saves the alias.
...
Also updates the `alias` documentation to mention the `-h`/`--help` option,
which was previously undocumented.
2018-04-09 01:08:56 +02:00
George Christou
c6e7b7ef00
prompt: Show untracked Git files relative to root directory ( #4874 )
...
* prompt/git: Match untracked files relative to root directory
* prompt/git: Move untracked file logic to a separate function
2018-04-09 01:05:03 +02:00
Mahmoud Al-Qudsi
366933413b
Fix string match argument parsing in __fish_seen_argument
2018-04-03 21:13:11 -05:00
Mahmoud Al-Qudsi
c492d03f51
Overhaul completions for set
and add new completions for set -e
...
Now the description includes the variable scope, `set [-e] -[Ugl]`
completions only provide variables matching that scope, and completions
that shouldn't be modified are hidden from the user. Completions that
are often modified but rarely unset (`fish_*` variables) are omitted
from `set -e` completions.
A new helper function `__fish_seen_argument` has been added that makes
it easy to only provied completions for a specific flag.
2018-04-03 14:42:26 -05:00
Mahmoud Al-Qudsi
99ecaec175
Use system web browser under WSL
...
Launch `cmd.exe /c "start URL"` under WSL for both `fish_config` and
`help`. This works around #4299 but does not address the underlying
issue (#1132 ).
2018-04-02 18:36:14 -05:00
David Adam
5c56765d12
hg prompt: fix infinite loop due to incorrect scoping
...
4b079e16e5
fixed some unintended behaviour
which the hg prompt was apparently relying upon, producing an infinite
loop whenever called.
2018-04-02 21:24:52 +08:00
ridiculousfish
ca13e816ce
Make fish more resilient to empty key bindings
...
If fish_key_bindings gets set to empty, fish will become unusable.
In this case reset it to fish_default_key_bindings.
2018-04-01 16:11:12 -07:00
Peter Ammon
7659554dea
Remove use of caret redirection from share/*
...
This removes the use of caret redirections from share/completions
and share/functions, in preparation for dropping support in fish.
2018-04-01 13:42:38 -07:00
Mahmoud Al-Qudsi
6d80ab8d74
Rename $pid (née %self) to $fish_pid
2018-03-24 11:54:27 -05:00
Daniel Beckwith
7583d57b63
Add Makefile --file detection to completion
2018-03-23 22:45:40 -07:00
Wilke Schwiedop
44e2c28255
revisit gentoo-related completions ( #4758 )
...
* revisit gentoo-related completions
- add completion for emaint
- improve completion for emerge
still incomplete, but an impovement regardless
- improve completion for equery
- add gentoo/portage-related auxiliary functions
* fix spelling
* remove trailing '.'
* remove old '_' invocation and capitalize descriptions
* add number-completion
* remove trailing '.'
* shorter descriptions
* replace sed with fish-builtin and drop deduplication
* batch change capitalization (lower case)
* indent equery descriptions
* batch change capitalization (upper case)
2018-03-23 19:42:30 +01:00
Mahmoud Al-Qudsi
007ae0b15e
Add colon.fish for : compatibility with sh and bash
...
no-op function for compatibility with sh, bash, and others.
Often used to insert a comment into a chain of commands without having
it eat up the remainder of the line, handy in Makefiles.
2018-03-14 17:41:09 -05:00
Mahmoud Al-Qudsi
c51abd04ff
Clean up $__fish_*dir variable names
...
Closes #4429
2018-03-12 08:34:20 -05:00
Mahmoud Al-Qudsi
b42b562d06
Revert prompt_hostname to short hostname only
...
Hat-tip: @zx8. Closes #4804 .
2018-03-12 08:24:42 -05:00
Mahmoud Al-Qudsi
18a9aa58cd
Add binding for MSFT/WSL paste escape sequence
2018-03-10 10:57:32 -06:00
Mahmoud Al-Qudsi
b3ec069401
Add missing $argv injection in fish_default_key_bindings.fish
...
These have to be present in all the default rules so that any errors can
be silenced at startup (and so additional arguments can be passed in).
2018-03-10 10:54:29 -06:00
Mahmoud Al-Qudsi
410f6fbd44
Switch prompt_hostname over to $hostname
2018-03-09 15:05:43 -06:00
Mahmoud Al-Qudsi
2a266c4d48
Update fish's only usage of read -s
to use read --shell
instead
2018-03-09 11:55:12 -06:00
Mahmoud Al-Qudsi
a6f79dcca8
Implement -s for fish_vi_key_bindings
...
In similar vein to how fish_default_key_bindings works, parameters
passed to the function are automatically passed to bind upstream.
Additionally, -s is automatically added if no parameters had been
specified to prevent startup error messages. See 46d1334
.
Closes #4494
2018-03-09 09:29:25 -06:00
Mahmoud Al-Qudsi
b236ab6e5d
Update %self references with $pid instead
2018-03-09 03:56:19 -06:00
Cesar Andreu
3792fb086a
Fix man autocomplete when a section is set
2018-03-06 20:50:20 +01:00
Fabian Homborg
93209ab053
Fix termux path
...
This is "/data/data/com.termux/files/usr/etc", not just ".../files/etc".
2018-03-06 17:55:25 +01:00
Fabian Homborg
e7f8e58be9
Add more ssh known_hosts paths
...
Fixes #4759 .
2018-03-06 15:27:34 +01:00
Mahmoud Al-Qudsi
225f748f79
Add __fish_parent_directories helper function for completions
...
Can be used to retrieve a list of parent paths, useful for searching
ancestors recursively via their absolute paths. Paths are returned from
deepest to shallowest, starting from the path passed in. Paths are not
validated for performance reasons. (Usually the input to
__fish_parent_directories would be (pwd) or (dir $file).)
2018-03-05 08:25:25 -06:00
George Christou
6f1ae79a13
alias: Fix string
args being parsed as options
2018-02-28 11:17:00 +01:00
ridiculousfish
973533e374
Teach alias about wrap argument injection
...
Update the alias function to pass arguments to 'wraps'. For example
alias gco='git checkout' now works like it ought to.
2018-02-27 14:12:44 -08:00
Kevin Konrad
8536a6825f
add completion for MacPorts
2018-02-24 23:32:25 +08:00
Fabian Homborg
f7adaeb97b
Use the new fish_exit event
2018-02-19 20:21:02 +01:00
ridiculousfish
c4a12f90c1
Bind pager-toggle-search to control-s by default.
2018-01-30 09:58:08 -08:00
Benoit Hamon
c92bb703dc
add few bindings for vi mode
2018-01-26 18:32:03 +01:00
Ivan Trubach
6066e243e0
Fixed suspend --force conditions
2018-01-19 11:23:55 +01:00
Thom Chiovoloni
7b88187310
Add ability to autosave functions at the end of funced
2018-01-18 18:03:52 +01:00
Thom Chiovoloni
42fa841573
Fix #4480 by using a temporary file with a redirect to the correct location.
2018-01-16 18:38:20 +01:00
Thom Chiovoloni
7dae40a240
Revert "Work around OS X issue with dropped #fragment in launched URLs"
...
This reverts commit 80b658e247
.
2018-01-16 18:38:20 +01:00
Fabian Homborg
66f181499b
Strip quotes in __fish_complete_suffix
...
Fixes #4481 .
2018-01-01 13:18:40 +01:00
Fabian Homborg
4096a7fda9
Revert "Fix "Unknown argument -s" error in fish_vi_key_bindings"
...
Unfortunately this made tests on travis fail - for some reason I still need to figure out.
This reverts commit 5acbd32c2e
.
2017-12-22 00:44:18 +01:00
Yurizal Susanto
94ff789c4b
Add eopkg completion support ( #4600 )
...
* Add eopkg support
Add support for eopkg in __fish_print_packages function, and
add new completion eopkg.fish in share/completions
* Sorry for the empty file
* Sorry for the empty file again
* Use builtin function for checking subcommand and options
* Fix description
* Use string function to replace grep and cut
* Add completion for search command
2017-12-21 16:43:21 +01:00
David Guyot
dcf9ce6fc5
Added completions/translations for zfs and zpool
2017-12-21 16:39:06 +01:00
Fabian Homborg
5acbd32c2e
Fix "Unknown argument -s" error in fish_vi_key_bindings
...
This was caused by it prepending "-s" to argv always,
and later checking $argv[1].
As it turns out, that is kinda superfluous, so we can just add "-s" to
the `bind` calls.
Also adjust the tests so the vi-bindings are enabled via the function,
which would have caught this.
Fixes #4494 .
2017-12-21 16:17:21 +01:00
Fabian Homborg
4ca9953114
Skip unusable paths in __fish_print_hostnames
...
See
https://github.com/fish-shell/fish-shell/issues/4511#issuecomment-343022740 .
This would try to `cd` to ~/.ssh even if it didn't exist. That's
clearly bogus.
2017-12-13 13:18:25 +01:00
Aaron Bieber
bfd2885279
add package parsing for OpenBSD
2017-12-12 19:18:53 +01:00
Aaron Bieber
440df37b41
parse *BSD interface names
2017-12-12 19:18:53 +01:00
Aaron Bieber
277cd30520
add ffs to known filesystems
2017-12-12 19:18:47 +01:00
Mahmoud Al-Qudsi
ae700c8707
Merge pull request #4581 from mqudsi/help_section_workaround
...
Work around OS X issue with dropped #fragment in launched URLs
2017-12-07 18:59:16 -06:00
ArkBriar
5faa425df1
fix #4521 ( #4575 )
2017-12-04 22:51:20 -08:00
Aaron Gyes
fa57565c42
Fix fish_opt --help
showing nextd manpage.
2017-11-14 01:56:58 -08:00
WEBER Logan
11cebe9483
feat(share:git-prompt): be able to truncate the branch name with a defined max length
2017-11-13 10:57:42 +01:00
Judson
37e0fbb5e4
Paginating last command
...
Often, I want to paginate the command I just ran.
Easy enough to <up><alt-p>, but this patch saves a keystroke.
2017-11-01 07:35:26 +08:00
Fabian Homborg
720f4ad742
Also allow "sles" as OS-ID for command-not-found-handler
...
"Suse Linux Enterprise Server".
Fixes #4447 .
2017-10-19 19:09:29 +02:00