Reputation:
Was git double and triple dot notation (..
and ...
) invented by the git guys or is it borrowed from some other place? I am just curious (and perhaps there's more fun stuff to learn waiting to be discovered :) ).
Upvotes: 3
Views: 153
Reputation: 8437
The double dot (..
) syntax is used in many places, for example in bash {1..3}
will be expanded to 1 2 3
(this is called brace expansion). It is also used in Haskell to generate lists and in Ruby to create ranges (Ruby also supports triple dots to exclude the last element).
Upvotes: 2