Commit graph

1071 commits

Author SHA1 Message Date
Kurtis Rader
51bbecc419 update realpath to use argparse 2017-07-13 14:33:11 -07:00
Kurtis Rader
3e6c57d5d3 update psub to use argparse 2017-07-13 14:12:51 -07:00
Kurtis Rader
30940916bd update prompt_pwd to use argparse 2017-07-13 14:12:51 -07:00
Kurtis Rader
51a52a7286 update open to use argparse 2017-07-13 14:12:51 -07:00
Kurtis Rader
e8243af20b update math to use argparse 2017-07-13 14:12:47 -07:00
Kurtis Rader
140e6204be update help to use argparse 2017-07-13 13:49:15 -07:00
Kurtis Rader
86af63cd39 update funcsave to use argparse 2017-07-13 13:35:26 -07:00
Kurtis Rader
6ecd0bcb32 update funced to use argparse 2017-07-13 13:29:35 -07:00
Kurtis Rader
df65ed8696 update dirs to use argparse 2017-07-13 11:53:29 -07:00
Kurtis Rader
30baf8d101 convert dirh to use argparse 2017-07-13 11:50:57 -07:00
Kurtis Rader
f156bea1b7 convert alias to use argparse 2017-07-13 11:47:41 -07:00
Kurtis Rader
05aae4764b convert popd and pushd to use argparse 2017-07-13 11:31:08 -07:00
Kurtis Rader
5ac8c42fad convert nextd to use argparse
Also fix a bug I introduce in `prevd` when I converted it to use `argparse`.
2017-07-13 11:30:48 -07:00
Kurtis Rader
3a782003ed have argparse report the proper command name 2017-07-12 22:38:32 -07:00
Kurtis Rader
abef2cc422 convert nextd to use argparse 2017-07-12 22:38:32 -07:00
Kurtis Rader
5cf2a50269 convert isatty to use argparse 2017-07-12 22:38:32 -07:00
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
e1951a32bb Fixed __fish_complete_users to better format GECOS 2017-07-11 17:00:08 +02:00
Kurtis Rader
8cc4639ea6 implement cdh command
Fixes #2847
2017-07-05 13:25:18 -07: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
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
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
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
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
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
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
Kurtis Rader
1f24432172 fix typo in error message 2017-06-09 12:12:36 -07: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
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
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
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