Custom Query (44 matches)
Results (7 - 9 of 44)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#42 | fixed | Add a /N switch to the history command | ||
Description |
/N would add the item to the history list only if it not already there. |
|||
#24 | fixed | Add ability to format internal variables | ||
Description |
Presently, _DATE (in the US locale) results in: mm-dd-yy which makes it unsuitable for such things as using it in batch scripts for creating date-based directory names, when one wants to sort them by yyyy-mm-dd. Similarly, _DAY results in: dd or d (the latter when the current date is prior to the 10th of the month). This means that when padding is desired, it must be explicitly stated, as in: %@right[2,0%_DAY%] which can be cumbersome for the part-time scripter, such as I. I propose adding the ability to format such strings either with INI settings or ENV vars, e.g.: SET DATEFMT=YYYY-MM-DD or SET DAYFMT=DD Use case: What I wanted was a simple one-liner for a command line to create a target directory for rsync, as in: X:\{hostname}\%_DATE\{volume} so that the above would be expanded to something like: X:\laptop\2013-12-08\DATA To achieve that formatting with 4OS2 3.08, the code would be: X:\{hostname}\%[_YEAR]-%@right[2,0%_MONTH]-%@right[2,0%_DAY]\{volume} which seems a bit cumbersome. |
|||
#25 | fixed | Add new internal variable: _TS (TimeStamp) | ||
Description |
Following onto my previous enhancement request (ticket #24), I propose a new internal variable, _TS, to return a formatted timestamp. Currently, Steve advises that he uses something like: %[_YEAR]%@right[2,0%_MONTH]%@right[2,0%_DAY]-%@right[2,0%_HOUR]%@right[2,0%_MINUTE] and sets that in an ENV var (SET TS=). By adding _TS as an internal variable and the associated TSFMT formatting template (per my suggestion in ticket #24): SET TSFMT=YYYY-MM-DD-HH-MM or SET TSFMT=YYYY-MM-DD-HH-MM-SS all that would be required would be to use a simple: %_TS to insert a timestamp of the desired precision on the command line or in a batch file. |