Commit graph

6933 commits

Author SHA1 Message Date
Fabian Homborg
44830589ab type: Fix "-a"
This matched _all_ executable commands, where it should only match all
executable commands _with the given name_.

Fixes #4070.

(cherry picked from commit 0fc9ec5538)
2017-05-26 18:04:18 -07:00
Kurtis Rader
ee572a13c8 fix regression introduced by 21521b2
The problem was overlooking a `break` statement when refactoring a
`switch` block into a simpler `if...else...` block. This fixes the
behavior of the `history-token-search-backward` function and its forward
searching analog.

Fixes #4065

(cherry picked from commit 8f78e71b6d)
2017-05-25 21:00:07 -07:00
Kevin Ballard
8d4d47b548 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.

(cherry picked from commit 9bc1b44b0d)
2017-05-25 22:37:31 +08:00
Kevin Ballard
80afc31ff8 Turn off bracketed paste when Fish exits
(cherry picked from commit 4ff002b9fb)
2017-05-25 22:37:31 +08:00
Kurtis Rader
0bf4d398ab fix killall completions
This fixes the obvious error in handling the `-u` short flag.
See issue #4052.

(cherry picked from commit a71bb03f23)
2017-05-25 22:37:31 +08:00
Fabian Homborg
4b53cd583d docs: Change misleading $status comment for set
It still performs the assignment even if the command substitution
returned unsuccessfully - `set foo (echo bar; false)` returns 1 but
sets $foo to bar.

Also use `type -p` instead of `which`.

(cherry picked from commit 0ee24b9bce)
2017-05-22 21:27:25 +08:00
Fabian Homborg
fdea1abf70 docs: Improve faq-exit-status
Add examples, a mention of `if command` and link to test/if.

See #2773.

(cherry picked from commit 64d33fac5d)
2017-05-22 21:27:25 +08:00
Fabian Homborg
3cca94b268 help: Properly error out when no browser is found
See #4045.

(cherry picked from commit 036b708d99)
2017-05-19 16:46:51 +08:00
Mo
291d88a72f 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

(cherry picked from commit 71f5fe1ece)
2017-05-19 16:46:51 +08:00
Kurtis Rader
40679560a6 make wreaddir() handle broken struct dirent
Some platforms do not correctly define `struct dirent` so that its
`d_name` member is long enough for the longest file name. Work around
such broken definitions.

Fixes #4030

(cherry picked from commit a5a9ca7d3b)
2017-05-17 22:37:55 -07:00
Sven Sternberger
c9c802d3fc Update __fish_print_hostnames.fish
For Ubuntu the default global known host files are :
/etc/ssh/ssh_known_hosts
/etc/ssh/ssh_known_hosts2
(cherry picked from commit cbd9181b7e)
2017-05-17 23:27:34 +08:00
David Adam
ec1f00e59b CHANGELOG: updates for 2.6.0 2017-05-16 13:07:55 +08:00
Alan Somers
a5d3ac8444 Fix syntax error in gphoto2 completions 2017-05-15 21:57:33 -07:00
ridiculousfish
4050166738 Fix lru.h compilation on Yosemite
The LRU cache wants to store references from nodes back into the
lookup map, so that it is efficient to remove a node from the
map. However certain compilers refuse to form a std::map::iterator
with an incomplete type. Fix this by storing a pointer to the key
instead of the iterator.

(cherry picked from commit 523dc6da6d)
2017-05-16 10:09:19 +08:00
David Adam
426653a9d7 Bump version for 2.6b1 2017-05-14 10:37:03 +08:00
David Adam
910f78dd74 osx/config.h: update to match current configure output on 10.11 2017-05-14 10:25:53 +08:00
David Adam
611cf852aa CHANGELOG: correct 2.6b1 entry 2017-05-14 10:03:27 +08:00
David Adam
c179e447a6 CHANGELOG: updates for 2.6b1 2017-05-13 22:43:06 +08: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
Kurtis Rader
9e64571de0 deal with lint in fish_key_reader.cpp 2017-05-11 21:56:04 -07:00
Kurtis Rader
63bb2da4d8 make some compilers happy
Commit f10e4f8 causes some old compilers to complain about implicit
return from non-void function. A false positive error but make the
compiler happy so it stops complaining.
2017-05-11 14:27:40 -07:00
Fabian Homborg
573e1ad4b1 type: Remove TODO
[Ci skip]
2017-05-11 15:24:47 +02:00
Kurtis Rader
c114cbc9af lint: deal with getpwent() warnings
This suppresses lint warnings about using `getpwent()` because there is
only one context where fish uses it. Thus the fact it may not be thread
safe is not relevant to fish. This also improves that call site in
`completer_t::try_complete_user()` method by short-circuiting the loop
when a match is found.
2017-05-10 22:07:01 -07:00
Kurtis Rader
f10e4f88b6 lint: replace getpwuid() with getpwuid_r() 2017-05-10 21:08:36 -07:00
Kurtis Rader
a92a7cbb9c lint: replace getpwname() with getpwnam_r() 2017-05-09 22:23:32 -07:00
Kurtis Rader
9b78857894 lint: replace ttyname() with ttyname_r() 2017-05-09 21:46:18 -07:00
Kurtis Rader
edf745232f lint: replace ctermid() with ctermid_r() 2017-05-09 21:39:25 -07:00
Kurtis Rader
5659898331 remove pointless flock() lint warning
The lint warning about possible problems using `flock()` to lock files
that I added isn't helpful and is just noise in the `make lint-all`
output. What we should do is is change to code to obviate the need for
file locking. But that's a big change for another day.
2017-05-09 21:03:00 -07:00
Kurtis Rader
f00084f28b lint: replace readdir() with readdir_r() 2017-05-09 21:02:05 -07:00
Kurtis Rader
3a0bb6b19a fix lint warning due to silly naming inconsitency 2017-05-09 21:01:27 -07: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
Kurtis Rader
e84200b847 remove incorrect statement from string docs
Another change related to issue #3985. I forgot to includes this in my
previous two changes related to to consistently returning status 121
when any command, not just `string`, is handed invalid args.
2017-05-07 21:26:45 -07:00
Kurtis Rader
e6e1805c5f another step in fixing issue #3985
This changes all of the builtins to behave like `string` to return
STATUS_INVALID_ARGS (121) if the args passed to the command don't make
sense. Also change several of the builtins to use the existing symbols
(e.g., STATUS_CMD_OK and STATUS_CMD_ERROR) rather than hardcoded "0"
and "1" for consistency and to make it easier to find such values in
the future.

Fixes #3985
2017-05-07 21:20:31 -07:00
Kurtis Rader
be2b6bfdc9 fix lint errors that have crept in 2017-05-06 22:08:07 -07: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
Kurtis Rader
4c38867768 another step in fixing issue #3985
This primarily replaces "STATUS_BUILTIN_OK" with "STATUS_CMD_OK" and
"STATUS_BUILTIN_ERROR" with "STATUS_CMD_ERROR". That is because we want
to make it clear these status codes are applicable to fish functions as
well as builtins. Future changes will make it easier to use these
symbols and values in functions.
2017-05-04 00:18:02 -07:00
Kurtis Rader
23978aee81 codify string retval for invalid arguments
This is the first, tiny, step in addressing issue #3985.
2017-05-03 22:18:36 -07:00
Kurtis Rader
fddd5fd045 fix how SIGHUP is handled when ignored
Working on a related problem caused me to notice that if a fish script
was run via `nohup` it would die when receiving SIGHUP. This fixes the
code to handle that correctly so that fish scripts can be nohup'd.

Fixes #4007
2017-05-03 22:16:41 -07: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
Kurtis Rader
4c798ce3b4 update changelog to include fix for #1432 2017-05-02 21:11:15 -07:00
Kurtis Rader
107127afb7 ensure no signals are blocked when started
Fixes #3964
2017-05-02 21:02:42 -07: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
Kurtis Rader
fb54d34788 change string match --filter to --entire
Per discussion in PR#3998 to review adding a `--filter` flag to `string
replace` rename the same flag in the `string match` subcommand to avoid
confusion about the meaning of the flag.
2017-05-01 22:19:58 -07:00
Kurtis Rader
16816a1202 add string replace --filter flag
Fixes #3348
2017-05-01 22:07:30 -07:00
Kurtis Rader
48d5342601 style cleanups
Time for another `make style-all`.
2017-05-01 22:05:35 -07:00