Commit Graph

12 Commits

Author SHA1 Message Date
Fabian Homborg
9367d4ff71 Reindent functions to remove useless quotes
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
2020-03-09 19:46:43 +01:00
Fabian Homborg
c14a7cbc8f seq.fish: Allow "--" separator
This ended up breaking the random test on OpenBSD (apparently the only
place where this is actually used).
2019-11-16 11:21:45 +01:00
Aaron Gyes
eaf496c1d4 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.
2019-03-09 13:44:03 -08:00
Fabian Homborg
bd5232e0e2 functions/seq: Fix negative numbers
25d83ed0d7 (included in 3.0.0) added a `string` check that
did not use `--`, so negative numbers were interpreted as options.

Apparently nobody is using this.

(Again, this is for the `seq` fallback used on OpenBSD)
2019-03-07 22:50:17 +01:00
Fabian Homborg
b5b0e68044 functions/seq: Stop using bc in the fallback
Just to remove the dependency - performance is probably about the
same.

This is used, AFAICT, exclusively on OpenBSD (not Free or Net).

CC @zanchey.
2019-03-07 14:04:32 +01:00
Aaron Gyes
25d83ed0d7 seq fallback speedup
Using `string match` instead of `grep -E` resulted in a 2x-3x speedup according
to $CMD_DURATION.
2017-09-22 00:30:26 -07:00
Fabian Homborg
0a8c922d92 Use command -sq instead of redirection
This option has been available for a while now and it's a bit shorter.
2017-02-18 22:16:55 +01: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
53fc9a4002 Remove circular dependency in fallback seq
This was subtle because `type` invoked seq.

Fixes #2570
2015-11-27 19:34:27 +01:00
Kevin Ballard
533496e43a Adopt the new type -q flag in the other functions 2014-07-13 19:11:29 -07:00
waterhouse
b1545c5ce2 'seq' should return 1, not exit 1, on bad arglist 2014-02-16 01:17:12 -08:00
ridiculousfish
1163961927 Actually add the seq function (oops) 2013-01-12 15:22:09 -08:00