Commit Graph

10 Commits

Author SHA1 Message Date
Fabian Homborg
a4f55d95d4 Detect GNU make via "--version"
Turns out that `make -pn` actually takes a while - about 300ms on
fish's makefile.

That's quite a bit of time just to throw away the output and use the
exit code.

So we just check for "GNU" in the version string.

It would be nice to just _do_ the completion and fall back on the
BSD-style if it doesn't work, but that is tricky to do with the pipe
to `awk` - the awk expression actually does not fail if `make` does
not print output.

And I don't know enough about awk to change that.
2018-05-11 16:16:14 +02:00
Peter Ammon
7659554dea Remove use of caret redirection from share/*
This removes the use of caret redirections from share/completions
and share/functions, in preparation for dropping support in fish.
2018-04-01 13:42:38 -07:00
Daniel Beckwith
7583d57b63 Add Makefile --file detection to completion 2018-03-23 22:45:40 -07:00
Terje Larsen
2740cc80d2 improve make target completion
- Support completing dynamic make targets.
- Support completing make targets when using -C/--directory.
- Support `-Cdir/path`, `-C dir/path`
- Support `--directory=dir/path`, `--directory dir/path`

This detects if the make command have the `-p` switch otherwise it
assumes it is BSD make and will run a different command to try to figure
out the available targets.
2016-12-21 19:04:15 -08:00
Kurtis Rader
11a60c8374 reformat all fish scripts
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
2016-11-27 21:27:22 -08:00
Fabian Homborg
b85a8bbbfe Rename sgrep to __fish_sgrep
Makes it harder to cause issues with aliases, see fish-shell#2245
2015-09-09 20:55:04 +02:00
ridiculousfish
20130d89dc Support for escaped colons in makefile targets in __fish_print_make_targets, as part of #1259 2014-01-29 15:42:52 -08:00
lledey
69c6b007aa Remove grep warning from make target completion
grep was throwing warnings when no Makefile was found

Signed-off-by: lledey <lledey@gmail.com>
2013-08-19 22:14:20 -04:00
Evan Jones
01780f19b1 Fix other usages of \n in sed replacements. 2012-06-17 15:01:04 -07:00
liljencrantz
dab7e6c7b9 Move mkae completion function to its own file
darcs-hash:20070921210401-75c98-6b303317ba375f0c6402e81902e599e79a9c06ed.gz
2007-09-22 07:04:01 +10:00