countdown
command in all languages possible. It is an adventure in chrestomathy. We seek to explore following.
-
How it is to write something useful in a particular language and not just 'Hello World'.
-
To have an opportunity to understand things that are woven around a particular language and make up important part of the overall developer expirience. This includes communities, libraries, package management, environment setup etc. Ideally entire expirience should be documented as well.
-
countdown
should refer to a specific binary and should not be a binary command. E.g.countdown
may be aliased tocountdown-node
to showcase the command implemented using Node runtime. Of coursecountdown-node
can be used directly as well. -
Following all simply outputs
Time is now!
string.-
countdown
outputs immediately as there is no duration provided. Here the duration is taken to be 0. -
countdown --milliseconds 2000
orcountdown -k 2000
outputs after 2000 milliseconds. -
countdown --seconds 20
orcountdown -s 20
outputs after 20 seconds. -
countdown --minutes 10
orcountdown -m 10
outputs after 10 minutes. -
countdown --minutes 10.5
orcountdown -m 10.5
outputs after 10.5 minutes. -
countdown --hours 2
orcountdown -h 2
outputs after 2 hours. -
countdown --hours 1.5
orcountdown -h 1.5
outputs after 1.5 hours. -
countdown -m 2.5 -s 15
outputs after 150+15 seconds. Various such combination should be possible. -
Options aliases list (and tolerance to spelling mistakes)
- k, mil, mils, mill, mills, milisecond, millisecond, miliseconds, milliseconds
- s, sec, secs, second, seconds
- m, min, mins, minute, minutes
- h, hr, hrs, hour, hours
-
countdown --help
displays the usage and exits. -
countdown --version
displays the version and which implementation it is pointing to and exits.
-
-
.countdownrc
file should be consulted. -
Support for installation.
-
Support for uninstallation.
-
Use
alias
to aliascountdown
to a specific implementation. E.g., following code aliases to a Node implementation.alias countdown='countdown-node'
-
Use
unalias
to remove the alias.unalias countdown
-
If you want to see which implementation the
countdown
is aliased to, use following command.alias | grep 'countdown'