mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
69c6b007aa
grep was throwing warnings when no Makefile was found Signed-off-by: lledey <lledey@gmail.com>
9 lines
358 B
Fish
9 lines
358 B
Fish
function __fish_print_make_targets
|
|
set files Makefile makefile GNUmakefile
|
|
# Some seds (e.g. on Mac OS X), don't support \n in the RHS
|
|
# Use a literal newline instead
|
|
# http://sed.sourceforge.net/sedfaq4.html#s4.1
|
|
sgrep -h -E '^[^#%=$[:space:]][^#%=$]*:([^=]|$)' $files ^/dev/null | cut -d ":" -f 1 | sed -e 's/^ *//;s/ *$//;s/ */\\
|
|
/g' ^/dev/null
|
|
end
|