Commit Graph

5717 Commits

Author SHA1 Message Date
ridiculousfish
3a7719015d Don't allow specifying an fd with a caret redirection
For example, an argument 12345^ is a real argument, not a redirection
There's no reason to use ^ here instead of >, and it's annoying to git
users.

Fixes #1873
2016-06-12 02:16:46 -07:00
Aaron Gyes
0ee03cbf98 Error on -w without a path before reading stdin
Oops, `fish_indent -w` just sits there waiting for input if nothing
is pointing at it, only to give user the error afterwards.
2016-06-12 01:07:33 -07:00
Aaron Gyes
67339caa33 Update CONTRIBUTING.md
Mention Coverity
2016-06-11 21:11:55 -07:00
ridiculousfish
d77c20b09a Don't cppcheck the pcre sources 2016-06-11 15:35:52 -07:00
ridiculousfish
d910aa15fe Avoid using chmod --reference in style.fish
chmod --reference is not available on OS X
Instead, we copy the source file into the temporary path, so that
mode bits are preserved
2016-06-11 15:28:40 -07:00
Fabian Homborg
5d20750aaa Merge pull request #3123 from moverest/completion
Extend autocompletion support
2016-06-10 18:47:55 +02:00
Aaron Gyes
c4e322d3ad Fix crash when fish_indent is using stdin with -w
When given no path, the logic was happy to try to use
an unitialized output_location.

  $ fish_indent -w < test.fish
  Opening "(null)" failed: Bad address

Initialize the string, and repair the logic to catch this case
and report the problem correctly.
2016-06-10 08:02:12 -07:00
Fabian Homborg
222a07e907 Allow compressed man pages in help
It seems Fedora compresses our whopping 340k of man pages.

Fixes #3130.

Inspired by @TieDyedDevil's work there.
2016-06-10 14:13:15 +02:00
Corey Ford
9d2092bf9f don't print header for each job 2016-06-08 21:15:07 -07:00
Clément Martinez
4d49c902ac Fix and enhance netctl-auto completions
I mixed things up with `netctl` somehow. Since the two are quite
different they do not have the same function, they should not have
the same completions.

I also find that I would be smarter to only display the relevent
profiles given what we want to do. If we want to disable a profile
we should only complete with enabled profile for completion for
instance. I don't know if the implemention is nice enough however.
2016-06-08 23:34:51 +02:00
Clément Martinez
65ed22d5a6 Add help option completions for godoc, gofmt, goimports, golint, gorename 2016-06-08 17:21:16 +02:00
Clément Martinez
09f9d71bb2 Clean mkdir completions 2016-06-08 16:03:21 +02:00
Clément Martinez
059e11078c Split __fish_print_modules from modprob.fish and modinfo.fish 2016-06-08 15:13:18 +02:00
Fabian Homborg
8829bb1364 Expand string documentation
Explain that globs need to match the entire string and a bit about our
regular expressions.
2016-06-08 15:04:54 +02:00
Clément Martinez
e30db95baa Refine mkdir completions for non SELinux and non GNU 2016-06-08 14:30:39 +02:00
Clément Martinez
970d895aca Add xz completions 2016-06-08 13:40:27 +02:00
Clément Martinez
c9b3220160 Add modinfo completions 2016-06-08 13:40:27 +02:00
Clément Martinez
10575d895d Add lscpu completions 2016-06-08 13:40:27 +02:00
Clément Martinez
67f3c01396 Add gorename completions 2016-06-08 13:40:27 +02:00
Clément Martinez
536d6cebd9 Add golint completions 2016-06-08 13:40:27 +02:00
Clément Martinez
7a97095583 Add goimports completions 2016-06-08 13:40:27 +02:00
Clément Martinez
f37dafdf52 Clean udisksctl 2016-06-08 08:32:50 +02:00
Clément Martinez
c84137aec8 Clean netctl-auto and udiskctl completions 2016-06-07 20:41:04 +02:00
Clément Martinez
f1dc1cd92b Add udisksctl autocomplete 2016-06-07 16:50:28 +02:00
Clément Martinez
41f2344cea Add termite autocomplete 2016-06-07 16:50:28 +02:00
Clément Martinez
a965a71079 Add poweroff autocomplete 2016-06-07 16:50:28 +02:00
Clément Martinez
913624cbfa Add netctl-auto autocomplete 2016-06-07 16:50:28 +02:00
Clément Martinez
220fd418a7 Add mkdir autocomplete 2016-06-07 16:50:28 +02:00
Clément Martinez
5dda908c1f Add gofmt autocomplete 2016-06-07 16:50:28 +02:00
Clément Martinez
b7f45c3783 Add godoc autocomplete 2016-06-07 16:50:28 +02:00
Clément Martinez
3a6e239437 Add alsamixer autocomplete 2016-06-07 16:50:28 +02:00
Aaron Gyes
7ef40f4e53 Merge pull request #3118 from floam/headerdoc-fixes
Update Xcode project, HeaderDoc comments.

Fix various invalid HeaderDoc comments.  Normalize autoload.cpp/autoload.h as an example of something closer to "proper" HeaderDoc formatting.

Have clang/Xcode validate HeaderDoc comments. Remove key_reader.cpp from Xcode project.
2016-06-05 21:42:01 -07:00
Aaron Gyes
2fafb13eaa Be a bit more consistent and proper. 2016-06-05 21:32:57 -07:00
Aaron Gyes
90ee810c73 These autoload comment should be HeaderDoc comments. 2016-06-05 19:24:23 -07:00
Aaron Gyes
1357f5a364 Repair various invalid HeaderDoc comments.
Enable build setting to allow Xcode to complain about invalid
comments.
2016-06-05 18:57:45 -07:00
Kurtis Rader
9f21e3792a remove dependency on dcgettext()
While fixing issue #3110 I noticed there is exactly one place we use
dcgettext() and that use is completely unnecessary. So remove it.
2016-06-05 18:52:19 -07:00
Kurtis Rader
0b385f145c simplify, and fix, setting the current locale
Fix test setup bogosities. Specifically, they weren't hermetic with respect to
locale env vars.

Rewrite the handling of locale vars to simplify the code and make it more like
the pattern most programs employ.

Fixes #3110
2016-06-05 15:49:34 -07:00
Fabian Homborg
32a585a52b git completions: Only take general options before command 2016-06-04 12:27:06 +02:00
Fabian Homborg
410d92ed61 git completions: Ignore stderr everywhere
This allows us to run git commands outside of a git repo.

Fixes #3114.
2016-06-04 12:26:06 +02:00
Kurtis Rader
53e865b654 put curses/terminfo vars into the environment
We need to actually export the curses/terminfo env vars in order for
`setupterm()` to be able to use them. While fixing this I reworked the
fallback logic implemented by @zanchey in response to issue #1060 in
order to simplify the logic and clarify the error messages.

This does not allow someone to change the curses/terminfo env vars after
the first prompt is displayed (you can but it won't affect the current
fish process). It only makes it possible to set `TERM`, `TERMINFO`, and
`TERMINFO_DIRS` in *config.fish* or similar config file and have them be
honored by fish.
2016-06-03 17:16:41 -07:00
Fabian Homborg
57f289850c Don't insert prefix for non-prefix matches
The issue here is that when inserting a common prefix for e.g. a
substring match, we increase the amount of available candidates again to
things the user didn't want.

An example is in share/functions - a completion for "inter" would
previously expand to "__fish_" because it matched:

- __fish_config_interactive.fish
- __fish_print_interfaces.fish
- __fish_print_lpr_printers.fish

The completion afterwards would then show 189 possible matches, only
three of which (the above) actually matched the original "inter".

Fixes #3089.
2016-06-02 21:25:50 -07:00
Beni Cherniavsky-Paskin
63a851cfd6 mention nullglob exceptions in failglob error msg 2016-06-02 19:51:19 -07:00
Hunsu
24d6f6d066 Add completions for git blame command (#3094) 2016-06-02 12:49:01 +02:00
Kurtis Rader
db1ec847f9 fix lint error in wgettext()
Cppcheck was complaining about the `return val.c_str()` at the end of the
`wgettext()` function. That would normally a bug since the lifetime of
`val` ends when the function returns. In this particular case that's not
true because the string is interned in a cache. Nonetheless, rather than
suppress the lint warning I decided to modify the API to be more idiomatic.

In the process of fixing the aforementioned lint warning I fixed several other
lint errors in that module.

This required making our copy of `wgetopt()` compatible with the rest of
the fish code. Specifically, by removing its local definitions of the
"_" macro so it uses the same macro used everywhere else in the fish
code. The sooner we kill the use of wide chars the better.
2016-06-01 22:19:03 -07:00
Jorge Bucaran
aee9d2c9d7 Do not hardcode RGB values in color definitions. 2016-06-01 21:50:19 -07:00
David Adam
22e0702e8d travis: disable clang build
Clang repositories currently offline, causing build errors.

Can be reverted once https://github.com/travis-ci/travis-ci/issues/6120
is fixed.
2016-06-02 08:19:26 +08:00
Jens Fredskov
29c38d73a2 correct __fish_contains_opts to __fish_contains_opt (#3102)
Completion throws and error about the command `__fish_contains_opts` beings unknown. It seems to be a simple typo, as all other completions use `__fish_contains_opt`
2016-06-01 23:58:38 +02:00
Fahri Cihan Demirci
8d11bb9f86 Add Purge Subcommand Completion for Apt (#3097) 2016-06-01 00:56:22 +02:00
Fabian Homborg
8d6735cb41 Make string match -rnv work
Fixes #3098.
2016-05-31 23:24:08 +02:00
Kurtis Rader
3d74b160b3 simplify some fish_tests code
This came to my attention because cppcheck was warning about possibly
dereferncing a NULL pointer.
2016-05-30 17:31:41 -07:00