You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frodo ~/Repos/github.com/skx/yal $ ./yal -h hms
hms
===
Return the current time as a string, formatted as 'HH:MM:SS'.
time:hms
========
Return the current time as a string, formatted as 'HH:MM:SS'.
zero-pad-single-number (num:number)
===================================
Return the given number, padded to two digits, as a string.
i.e. Add a '0' prefix to the specified number, for values less than ten.
This is designed to pad the hours, minutes, and seconds in (hms).
If we added an "Alias string" method to the primitives we could set that in the (alias ..), which would allow:
..
hms
===
This is an alias of the function (time:hms)
..
It wouldn't make a massive amount of difference, but it would be cute!
The text was updated successfully, but these errors were encountered:
This pull request closes#68 by showing aliased functions specially
in the output of yal when running with "-h".
For example:
```
$ ./yal -h hms
hms
===
hms is an alias for time:hms.
time:hms
========
Return the current time as a string, formatted as 'HH:MM:SS'.
zero-pad-single-number (num:number)
===================================
Return the given number, padded to two digits, as a string.
i.e. Add a '0' prefix to the specified number, for values less than ten.
This is designed to pad the hours, minutes, and seconds in (hms).
```
When called via `(help)` everything works as-is, so there is no
mention of the alias when this code runs:
```
(print (help hms))
```
(Because we don't have access to the name, to lookup the function,
we just the result, when our arguments are expanded.)
Currently aliased functions show up twice:
If we added an "Alias string" method to the primitives we could set that in the
(alias ..)
, which would allow:It wouldn't make a massive amount of difference, but it would be cute!
The text was updated successfully, but these errors were encountered: