Custom Query (44 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (7 - 9 of 44)

1 2 3 4 5 6 7 8 9 10 11 12 13
Ticket Resolution Summary Owner Reporter
#42 fixed Add a /N switch to the history command Gregg Young Gregg Young
Description

/N would add the item to the history list only if it not already there.

#24 fixed Add ability to format internal variables Gregg Young Lewis Rosenthal
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) Gregg Young Lewis Rosenthal
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.

1 2 3 4 5 6 7 8 9 10 11 12 13
Note: See TracQuery for help on using queries.