Commit Graph

7208 Commits

Author SHA1 Message Date
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
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
Kurtis Rader
8f78e71b6d 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
2017-05-25 20:57:30 -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
Kevin Ballard
f9e7ca869f Merge pull request #4057 from fish-shell/makefile_tweaks
A few Makefile tweaks
2017-05-24 11:20:15 -07:00
David Adam
8db12fe897 travis: only run tests if make succeeds 2017-05-24 11:39:59 +08: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
Kevin Ballard
ee6c23e6c2 Extract doc install into a separate target install-doc
This way people who install via Xcode can run `make install-doc` to get
the documentation pages, as Xcode doesn't include them.
2017-05-23 16:57:26 -07:00
Kevin Ballard
027667be53 Get rid of all the ||: stuff in the Makefile
Make has a built-in way of ignoring errors.
2017-05-23 16:57:24 -07:00
Kevin Ballard
36c2ecb64f Fix the ditto command in make xcode-install 2017-05-23 16:57:17 -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
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
a3a069234b Don't complete files if no completion can be found
This essentially breaks the "--no-files" flag to `complete`.

Some commands simply do _not_ take files.

Fixes #112.
2017-05-21 15:42:35 +02:00
Kurtis Rader
6c4a51d56e improve bash history importing
Reject more invalid commands from the bash history file.

Fixes #3636
2017-05-20 21:03:31 -07:00
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
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
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
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
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
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
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
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
Alan Somers
3aa42389ef Fix syntax error in gphoto2 completions 2017-05-15 21:53:56 -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
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
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