Commit graph

6932 commits

Author SHA1 Message Date
Kurtis Rader
0b976a1843 fix wcsfilecmp()
This started out as a refactoring to eliminate the lint warnings. Adding
unit tests revealed the current implementation does not behave as
implied. So this is a complete rewrite of the implementation. With the
addition of unit tests so that it doesn't break in the future and anyone
who thinks this new version behaves wrong can update the unit tests to
help ensure we're testing for the correct behavior.

Fixes #4027
2017-05-19 21:09:07 -07:00
Fabian Homborg
0ee24b9bce 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`.
2017-05-19 19:06:44 +02:00
Fabian Homborg
64d33fac5d docs: Improve faq-exit-status
Add examples, a mention of `if command` and link to test/if.

See #2773.
2017-05-19 19:05:47 +02: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
Kurtis Rader
d00ab4a326 fix some trivial style problems 2017-05-17 23:07:47 -07:00
Kurtis Rader
a5a9ca7d3b 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
2017-05-17 22:35:28 -07:00
ridiculousfish
1f9349fb71 Initialize the key in lru_node_t to NULL
Fixes a lint error and a coding smell.
2017-05-17 21:05:32 -07: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
David Adam
e92779981f README.md: add gmake caveat to autotools section 2017-05-16 20:22:06 +08:00
David Adam
846de82bb4 build_tools: drop completions generators
The generators for various version control systems have not been run for
some time and will overwrite the updated completions already in the the
tree.
2017-05-16 20:22:06 +08:00
David Adam
09cff3f4fe .gitattributes: include build tools in exported archives
Most of these tools are actually useful even without a git tree present.
2017-05-16 20:22:06 +08:00
Alan Somers
3aa42389ef Fix syntax error in gphoto2 completions 2017-05-15 21:53:56 -07:00
ridiculousfish
523dc6da6d 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.
2017-05-15 09:11:40 -07: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
David Adam
46d86766c4 README.md: drop which requirement
No longer required following merge of #3945.
2017-05-02 09:26:52 +08:00