Commit graph

2075 commits

Author SHA1 Message Date
Alexey Alekhin
326f2affa4 Fixed functions -D/--details completion 2017-08-07 17:43:05 -07:00
Sam Yu
0988f53c70 Speedup git prompt
Fix __fish_git_prompt too slow under repo with lots of untracked
files when __fish_git_prompt_showuntrackedfiles enabled.
2017-08-04 20:43:07 -07:00
Raoul Wols
8e3a9c9585 Add Sublime Text 3 completions 2017-07-31 22:09:06 -07:00
Daniel K
d68b631919 fix check for existing variable 2017-07-29 21:18:44 -07:00
Kurtis Rader
4e026588f4 modify prev commit to use builtin cd
Using the `cd` function can have undesirable side effects like mucking
with the directory history. So force the use of the builtin cd.
2017-07-27 14:36:32 -07:00
Kurtis Rader
defdc92b57 fix ssh config Include file handling
Fixes #4253
2017-07-27 14:36:32 -07:00
Thales Mello
a071deaf61 Make npm run-script completion faster with jq (#4241)
* Make npm run-script completion faster with `jq`

When jq is available, it's actually faster to invoke jq and parse the `package.json`
invoking the `npm` command.

Also, prior to this commit, both `__fish_complete_npm` and `__fish_npm_run` were being run
whenever completions for `npm run` subcommand was being used, which was actually making
repetitive work (invoking npm command twice). This pull request is supposed to make completion
without `jq` faster as well

* Refactor npm.fish for code reutilization

Created function to handle both cases of npm run completion parse, with or without `jq` completion.

* Remove unecessary blank line
2017-07-26 13:31:35 +02:00
Kurtis Rader
92f39f7b89 fix bug introduced by commit 86af63cd3 2017-07-25 14:03:40 -07:00
Mohamed Akram
d2d707a6fa Ignore comments when creating man page completion 2017-07-22 21:32:56 -07:00
Fabian Homborg
7304d82416 Fix file completion for tail 2017-07-22 14:09:34 +02:00
Raphael P
3fc0faaebb Update completions for heroku pg:backups
heroku pgbackups has been deprecated and replaced by heroku pg:backups command.
See: https://devcenter.heroku.com/changelog-items/623

Completion for new subcommand has been added as well.
2017-07-22 11:08:15 +02:00
Kurtis Rader
d068f846e8 simplify history function
The fix for #4232 allows us to simplify the `history` function slightly.
2017-07-21 16:26:15 -07:00
Fabian Homborg
e0f0164b16 Quote $USER when used with switch or test
Common in prompts, this would fail if $USER is empty.

See #4229.
2017-07-20 19:45:32 +02:00
Kurtis Rader
0dc92fbb2d a make style-all cleanup 2017-07-18 22:40:25 -07:00
Kurtis Rader
69ecda5082 update math to use the new argparse validation 2017-07-18 15:03:08 -07:00
Kurtis Rader
4e1303823b add ability for argparse to validate args
Fixes #4211
2017-07-18 14:42:50 -07:00
Kurtis Rader
403d9691cb fix handling of ssh aliases
Fixes #4213
2017-07-17 21:13:21 -07:00
Kurtis Rader
8f22def8f7 return to psub --file being the default
The recent change to switch `psub` to use `argparse` caused it to use
a fifo by default because it inadvertently fixed a long standing bug in
the fish script. This changes the behavior back to `psub --file` being
the default behavior and introduces a `--fifo` flag. It also updates the
documentation to make it clearer when and why `--fifo` mode should not
be used.

Fixes #4222
2017-07-17 14:33:51 -07:00
Kurtis Rader
3e226f0a5e implement a new implicit int option spec
While updating the `history` function to use `argparse` I realized it is
useful to define an option that can be used in three ways. First by
using the short flag; e.g., `-n NNN`. Second by using the long flag;
e.g., `--max NNN`. Third, as an implicit int flag; e.g., `-NNN`. This
use case is now supported by a spec of the form `n#max`.
2017-07-16 18:27:41 -07:00
Kurtis Rader
c22df3b823 update history to use argparse 2017-07-16 15:13:39 -07:00
Kurtis Rader
f2c8e73891 add more alias unit tests
A recent regression to the `alias` command points out the need for more
unit tests of its behavior. I also decided to use it as an opportunity
to normalize the output of just `alias` to list aliases.
2017-07-15 17:36:36 -07:00
Kurtis Rader
98449fec51 fix math regression
The previous change to use `argparse` for parity with every other
builtin and function introduced a regression. Invocations that start
with a negative number can fail because the negative value looks like an
invalid flag.
2017-07-14 16:03:31 -07:00
Kurtis Rader
ff4d275f22 remove left over debug statement 2017-07-14 08:18:41 -07:00
Kurtis Rader
49a0841533 update type to use argparse 2017-07-13 15:19:02 -07:00
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
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