seq.fish: use gseq if available.

Apparently if you install gnu coreutils on OpenBSD, the tools are
g-prefixed. So we definitely want to just alias that rather than
provide our lousy shell script implementation.
This commit is contained in:
Aaron Gyes 2019-03-09 13:39:51 -08:00
parent ba1249763b
commit eaf496c1d4

View file

@ -2,10 +2,18 @@
# We can't call type here because that also calls seq
if not command -sq seq
if command -sq gseq
# No seq provided by the OS, but GNU coreutils was apparently installed, fantastic
function seq --description "Print sequences of numbers (gseq)"
gseq $argv
end
exit
else
# No seq command
function seq --description "Print sequences of numbers"
__fish_fallback_seq $argv
end
end
function __fish_fallback_seq --description "Fallback implementation of the seq command"