Kurtis Rader
3c4e3035fd
switch from getopt
to argparse
...
Convert our two functions that use `getopt` to use our new `argparse`
builtin.
Fixes #4190
2017-07-12 22:38:32 -07:00
Kurtis Rader
a4dc2b872b
implement fish_opt
helper command
...
This implements a `fish_opt` command that provides a way for people
to create option specs for the `argparse` command as an alternative to
creating such strings by hand.
Fixes #4190
2017-07-12 22:38:32 -07:00
David Marchal
bd5c98298c
Added completions for passwd
2017-07-11 17:10:24 +02:00
David Marchal
e1951a32bb
Fixed __fish_complete_users to better format GECOS
2017-07-11 17:00:08 +02:00
PenegalECI
c577d01207
Add completions for mdadm ( #4198 )
...
* Added completions for mdadm
* Applied changes requested by @faho and @krader1961
2017-07-10 17:13:35 +02:00
Kurtis Rader
8cc4639ea6
implement cdh
command
...
Fixes #2847
2017-07-05 13:25:18 -07:00
tamanugi
6b92f830ff
Use __fish_complete_user_at_hosts
2017-07-05 16:24:45 +02:00
tamanugi
170f11771b
Add function __fish_complete_user_at_hosts
...
This function list hostnames;
if commandline hoge@~ , it list hoge@(hostname)
2017-07-05 16:24:45 +02:00
tamanugi
70c9d78536
Add fab completions
2017-07-05 16:24:39 +02:00
Fabian Homborg
d6a9d6c59e
git completions: Add missing quote
...
Fixes #4187 .
2017-07-05 15:04:44 +02:00
Kurtis Rader
83ecf84392
harden git completion against an undef var
2017-07-04 17:34:52 -07:00
Kurtis Rader
4853ec0281
harden psub
again an undef TMPDIR
2017-07-04 16:35:32 -07:00
Kurtis Rader
8caab103d8
harden man
against undef vars
2017-07-04 13:56:35 -07:00
Kurtis Rader
2df89f4b0f
check if $fish_color_cancel is set before using it
2017-07-04 13:56:35 -07:00
Fabian Homborg
9fb7037174
fish_key_reader: Add --version option
...
This should be there anyway, and we try to find fish_key_reader for
.app bundles, so this stops us from defining aliases to the command.
See #4179 .
2017-07-04 22:55:47 +02:00
Kurtis Rader
f6d101e7ad
fix undef var reference in history
...
The change for issue #4163 brought to light the pointless attempt to use
`$_` in the `history` function.
2017-07-03 16:26:27 -07:00
Kurtis Rader
0ec9acf0f0
harden abbr
against undef vars
...
This is only needed if we make undefined vars an error as proposed in
issue #4163 but it's a good idea anyway.
2017-07-03 13:05:50 -07:00
Kurtis Rader
763063e741
more changes to better handle undef vars
...
This is only needed if we make undefined vars an error as proposed in
issue #4163 but it's a good idea anyway.
2017-07-03 10:16:31 -07:00
Kurtis Rader
4f345fdee7
harden *share/config.fish* against an unset var
...
This is only needed if we make undefined vars an error as proposed in
issue #4163 but it's a good idea anyway.
2017-07-02 21:16:48 -07:00
Kurtis Rader
ea38519a12
fix var name in __fish_git_prompt
...
Var `___git_ps_color_suffix_done` is supposed to be
`___fish_git_prompt_color_suffix_done`. This bug was found by an
experimental change to detect the use of undefined variables (#4163 ).
Similarly, we should simply test whether `__fish_git_prompt_showcolorhints`
is set rather than set to a non-empty string.
2017-07-02 20:49:40 -07:00
Kurtis Rader
85b42b22f4
define __fish_active_key_bindings before using it
2017-07-02 13:41:40 -07:00
Kurtis Rader
3284393aba
cleanup some undefined var references
...
Testing a fix for #4163 revealed some questionable dereferencing of
variables that are not certain to be defined.
2017-07-02 13:41:40 -07:00
Sam Yu
6f6a4a842c
Fix typo in zypper.fish
2017-06-30 14:46:43 +02:00
Fabian Homborg
3b5fdc3fb0
git completions: Fix aliases with weird characters
...
A use for the new `string escape --style=var`.
Fixes #4147 .
2017-06-28 23:21:33 +02:00
Fabian Homborg
db529f06b8
type: Use command -a
2017-06-28 23:13:36 +02:00
Kurtis Rader
bb29f9f990
replace __fish_urlencode with string escape
...
We now have a builtin that can do URL escaping so use it. I can't find
any uses of our private `__fish_urlencode` function in any Oh-My-Fish or
Fisherman code so remove it.
2017-06-23 22:46:36 -07:00
Kurtis Rader
30368d5526
implement status function
when in a breakpoint
...
Another step to fixing #1310 . This changes means that `status -L0
function` reports the correct function when inside a breakpoint.
2017-06-23 22:14:21 -07:00
Hector Sanjuan
2d42baac35
Fix last status report (it's always 0)
...
It seems something is overwriting the status before it is
saved to a variable. Fixed by setting the last_status variable
at the very beginning.
2017-06-22 14:01:19 +02:00
Kurtis Rader
df01547eab
implement the fish_breakpoint_prompt
function
...
This is another step to resolving issue #1310 . It makes
`fish_breakpoint_prompt` a replacement for `fish_prompt` if it is defined
and we're presenting a prompt in the context of a `breakpoint` command.
2017-06-20 17:18:59 -07:00
Kurtis Rader
bd299e96b2
implement status is-breakpoint
...
This implements `status is-breakpoint` that returns true if the current
shell prompt is displayed in the context of a `breakpoint` command.
This also fixes several bugs. Most notably making `breakpoint` a no-op if
the shell isn't interactive. Also, typing `breakpoint` at an interactive
prompt should be an error rather than creating a new nested debugging
context.
Partial fix for #1310
2017-06-20 17:18:59 -07:00
Rabah Meradi
d234a1870b
Aucompletion for jest CLI
2017-06-19 23:27:22 -07:00
Fabian Homborg
1a135aa0b0
git completions: Make checking aliases faster
...
See #4117 .
2017-06-19 11:04:40 +02:00
Clément Martinez
d5e1405cbe
Add as completions
2017-06-18 23:10:23 -07:00
Kurtis Rader
af22bf3501
style cleanups (make style-all)
2017-06-16 21:01:57 -07:00
Fabian Homborg
cec2999983
Allow help
to open the tutorial
...
This is unambiguous because all the anchors in tutorial.html begin
with "tut".
2017-06-14 13:52:24 +02:00
Fabian Homborg
82359ceb22
Update help completions
...
- More topics
- Some non-existent topics (todo/bugs) removed
- Some rewording (no more "Help on")
2017-06-14 13:40:14 +02:00
Clément Martinez
be1d32cade
Add grub-install completions
2017-06-14 12:41:38 +02:00
Clément Martinez
a69537ea13
Add grub-file completions
2017-06-14 12:41:38 +02:00
Dale Eidd
2b4f61f294
Fix echo "no wildcard match" complaints for ssh completions etc
2017-06-10 14:06:20 +02:00
Dale Eidd
5b3904e66b
Fix not including main ssh config in host names search
2017-06-10 14:06:20 +02:00
Clément Martinez
6161f54111
Add dhcpcd completions
2017-06-10 14:05:38 +02:00
Kurtis Rader
1f24432172
fix typo in error message
2017-06-09 12:12:36 -07:00
Daryl Roberts
a0c8a9e8ed
update the node options for __fish_not_contain_opt to not have the "--" in front of their flags
2017-06-09 12:11:10 -07:00
Fabian Homborg
edaef4e6b0
Fix stray quote in magento completions
...
Fixes #4108 .
2017-06-07 11:35:12 +02:00
Kurtis Rader
352cea1659
disable/enable bracketed paste by edit cmd buf
...
We need to disable/enable bracketed paste mode around running the editor
from within the `edit_command_buffer` function.
2017-06-05 11:32:06 -07:00
Kurtis Rader
5ef8b91db8
fix three explicitly translated messages
2017-06-02 20:40:58 -07:00
George Christou
5e39efa45b
Fix ln
file completion
2017-06-01 19:06:32 -07:00
Kurtis Rader
b8aacc29cd
remove redundant output from __fish_complete_cd
...
Fixes #4085
2017-06-01 18:55:41 -07:00
Kurtis Rader
ee646c8dd0
move set -l
to top of function
...
Fixes #4091
2017-06-01 17:58:29 -07:00
Martin Pelikan
65b0b947c9
Remove redundant/non-existent bind forward-kill-word
2017-06-01 17:50:05 -07:00
Kevin Ballard
3061eed647
Fix usage of osascript in help
...
Work around a macOS osascript bug in 10.12.5 which prevented help from
working. See #4035 .
2017-05-31 23:01:31 +08:00
Kevin Ballard
5c140e5570
Revert "Use open instead of osascript in help"
...
This reverts commit f234637e53
.
2017-05-31 23:01:31 +08:00
mascafidi
4c47fbc964
Add Expert Options to DUP command completion
2017-05-30 22:38:15 -07:00
ridiculousfish
2f5af733ba
Use open instead of webbrowser.open on macOS >= 10.12.5
...
Works around an osascript bug. Fixes #4035 .
2017-05-30 20:53:59 +08:00
ridiculousfish
f234637e53
Use open instead of osascript in help
...
Work around a macOS osascript bug in 10.12.5 which prevented help
from working. Fixes #4035 .
2017-05-30 20:53:59 +08:00
Fabian Homborg
0fc9ec5538
type: Fix "-a"
...
This matched _all_ executable commands, where it should only match all
executable commands _with the given name_.
Fixes #4070 .
2017-05-26 23:58:35 +02:00
Fabian Homborg
4afd41877f
Fix various expansions in cd completions
...
This actually used the built-in file-completion logic as a fallback
for e.g. tilde-expansion (stuff like `cd ~/V`).
Fixes #4061 .
2017-05-26 16:57:42 +02:00
Kevin Ballard
9bc1b44b0d
Handle missing groff macro in __fish_print_help
...
The Xcode installation of Fish is missing the groff macro used by
`__fish_print_help`. This caused e.g. `status -h` to stop working.
Fixes #4058 .
2017-05-23 19:57:18 -07:00
Kevin Ballard
4ff002b9fb
Turn off bracketed paste when Fish exits
2017-05-23 17:36:09 -07:00
Kurtis Rader
a71bb03f23
fix killall
completions
...
This fixes the obvious error in handling the `-u` short flag.
See issue #4052 .
2017-05-22 20:17:08 -07:00
Fabian Homborg
036b708d99
help: Properly error out when no browser is found
...
See #4045 .
2017-05-18 22:51:57 +02:00
Mo
71f5fe1ece
Added Magento2 CLI completions ( #4043 )
...
* Added Magento2 CLI completions
This is the completion file for the Magento2 CLI application I use on my servers. It has an additional feature tho, I'm not sure if it fits into the fish completion philosophy:
If you provide limited access credentials, it will connect to the MySQL database and provide additional suggestions, such as available users, themes or indexers in the database. If this file is never touched, those suggestions simply won't show up. I, personally, find them to be pretty useful, though.
Should I remove those database suggestions before creating a PR?
* Removed functions using MySQL, updated formatting
* Several smaller fixes
* Improved descriptions
Tried to shorten the text as much as possible and removed unnecessary characters
2017-05-18 17:05:49 +02:00
Sven Sternberger
cbd9181b7e
Update __fish_print_hostnames.fish
...
For Ubuntu the default global known host files are :
/etc/ssh/ssh_known_hosts
/etc/ssh/ssh_known_hosts2
2017-05-17 16:59:18 +02:00
Alan Somers
3aa42389ef
Fix syntax error in gphoto2 completions
2017-05-15 21:53:56 -07:00
Jonas Damtoft
573c539956
Gradle-completions for gradle tasks ( #3972 )
...
* Implement https://github.com/hanny24/gradle-fish/blob/master/gradle.load
* Use XDG_CACHE_HOME
* Use __funced_md5
* Fix fish_md5.fish
* Actually use the new function.
* Use string match for matching tasks
* I goofed. Actually pass a string to complete -a
* Fix attempt to remove needed function...
* Fix regex
* Fix fish_md5.fish to use a flag
2017-05-13 13:28:32 +02:00
Fabian Homborg
573e1ad4b1
type: Remove TODO
...
[Ci skip]
2017-05-11 15:24:47 +02:00
Clément Martinez
f0a00ab2f2
Add mkdosfs completions
2017-05-08 19:16:06 +02:00
Sebastian Keller
6620b9ec72
Add gsettings completions
2017-05-08 19:14:47 +02:00
Fabian Homborg
8814f34dc1
Improve killall completions
...
- Remove UID resolution, since that can be slow.
- Remove a `uname` call by storing the result
- Stringify
- Indent
Fixes #3996 .
2017-05-04 23:58:45 +02:00
Adriaan Zonnenberg
09ce297352
Add completions for caddy
2017-05-04 15:09:29 +02:00
Fabian Homborg
084a820de3
Stringify xrandr completions
2017-05-03 23:36:43 +02:00
Fabian Homborg
c06a71bfbe
Stringify hg completions
2017-05-03 23:36:25 +02:00
Fabian Homborg
044d45a0ff
Stringify adb completions
...
Also reindent.
2017-05-03 23:35:34 +02:00
David Adam
d3cfab1391
webconfig: apply colour syntax highlighting to functions tab
...
Closes #1432 .
2017-05-03 08:37:27 +10:00
David Adam
1e9caecbcb
webconfig: import angular-sanitize module
...
Enables use of ngBindHtml.
Work on #1432 .
2017-05-03 08:37:27 +10:00
Fabian Homborg
f5fac096c0
Don't move cursor in delete-char
...
Instead, move forward and backward in vi-mode.
Fixes #3899 .
2017-04-28 22:53:03 +08:00
David Bishop
2565c5c15b
Use $suffix in classic_vcs prompt instead of hardcoding to '>'
...
Also, ensure that suffix is local in both classic_vcs.fish and informative_vcs.fish.
Fixes #3991
2017-04-26 16:01:52 -07:00
Fabian Homborg
77201ade34
__fish_complete_users: Also test for command, not path
2017-04-25 17:36:22 +02:00
Fabian Homborg
49d3a58a9e
__fish_complete_users: Use command
, not a hardcoded path
2017-04-25 12:47:23 +02:00
Kurtis Rader
37508d1f1e
refactor the __*_users functions
...
Per my comment in issue #3980 this implements `__fish_print_users` in
terms of `__fish_complete_users` so we don't have to modify both when a
change to how users are enumerated is needed.
2017-04-23 20:08:40 -07:00
Christian Rondeau
bea0b17c9e
Aucompletion guards for /etc/passwd #3980
2017-04-23 19:41:07 -07:00
Fabian Homborg
ec92e91ddc
fish_clipboard_paste: Turn \r into \n
...
We already do this in bracketed-paste because it's really confusing to
have a \r literal in the commandline.
2017-04-23 13:40:40 +02:00
Fabian Homborg
cc7d83fa94
fish_clipboard_paste: Fix multiline pasting
2017-04-23 13:38:32 +02:00
Fabian Homborg
17ba21cfe4
Fix pasting backslashes
...
Another missing escape.
Fixes #3981 .
2017-04-23 13:32:24 +02:00
Alex Gaynor
f30c50cec5
[hg completions] remove a grep and use hg's native query syntax
...
This has the side benefit of working around a wild bug with readline+fish that I've reported to the upstream readline developers. (The result of that bug is that the hg processes are constantly being leaked as `bg` jobs in the shell, which is how I came to notice this in the first place)
2017-04-21 18:56:54 +02:00
Fabian Homborg
805a177673
__fish_config_interactive: Prefer python3
...
Also includes the CHANGELOG.
2017-04-21 13:45:49 +02:00
Fabian Homborg
e410d47565
fish_config: Pick a python
...
Also remove a use of `eval` and `string escape`.
Fixes #3970 .
2017-04-21 13:45:49 +02:00
Fabian Homborg
7ef2d5e86f
fish_update_completions: Pick a python
...
This removes a need for packagers to either patch our shebangs or pick
a particular python.
This was already done in __fish_config_interactive (where we need to
duplicate the code because it involves backgrounding).
Work towards #3970 .
2017-04-21 13:45:49 +02:00
Kurtis Rader
b9d2e4d897
fix fish greeting regression
...
Fixes #3973
2017-04-20 20:17:50 -07:00
Fabian Homborg
cb9f4e621f
lua completions: Try harder to find libraries
...
Fedora puts them in /usr/lib64 without having /usr/lib as a symlink.
Also silence errors (in case a directory doesn't exist) and stringify.
See https://bugzilla.redhat.com/show_bug.cgi?id=1442628 .
CC @amluto.
2017-04-20 14:00:30 +02:00
Fabian Homborg
7c6600895e
Add missing options to functions completion
2017-04-19 23:11:35 +02:00
Francisco Giordano
349eff0df7
change cancel_commandline function to use color from variable
...
This allows the user to define how they want the "^C" rendered when a
pending command line is interrupted.
2017-04-17 21:16:42 -07:00
Ivan Trubach
a9db99ac52
Rename replace-one to replace_one
...
Fixes invalid character in variable name $fish_cursor_replace-one (used by fish_vi_cursor[_handle]) by renaming bind mode 'replace-one' to 'replace_one'.
2017-04-17 21:10:23 -07:00
Adam Byrtek
e7d686461e
Terraform completions ( #3960 )
...
* Basic Terraform completion supporting all commands
* Option completion for Terraform commands
* Search command line in reverse order
* CHANGELOG entry
* Fix `terraform untaint` completion
* Use common completion functions to handle subcommands
* Use imperative form and remove CHANGELOG changes
2017-04-17 17:18:39 +02:00
Adam Byrtek
dd69ca5a81
Warn when function is not modified by the editor after calling funced
( #3961 )
...
* Check whether tmp file was modified in `funced`
* More idiomatic error messages
* Store the checksum in a local variable
* MD5 function supporting both GNU and BSD
* Use `else if` in MD5 function
* Use `string` builtin instead of `cut`
2017-04-17 17:18:02 +02:00
Kurtis Rader
dcc081a594
mark __fish_sgrep as deprecated
...
Fixes #2450
2017-04-15 21:51:33 -07:00
Kurtis Rader
75f1e36b44
a step to remove __fish_sgrep per issue #2450
2017-04-15 21:49:08 -07:00
Kurtis Rader
b3617cfd86
a step to remove __fish_sgrep per issue #2450
2017-04-15 21:30:36 -07:00
Kurtis Rader
a381d959f2
a step to remove __fish_sgrep per issue #2450
2017-04-15 21:29:07 -07:00
Kurtis Rader
ae03df4bc4
a step to remove __fish_sgrep per issue #2450
2017-04-15 21:22:09 -07:00