mndrix / clk

a distributed time clock application for the command line
The Unlicense
2 stars 0 forks source link

clk in inference #11

Open mndrix opened 14 years ago

mndrix commented 14 years ago

I often clk in to work on items where the default format for specifying tags and the message is redundant. For instance, when reviewing a changeset for one client, I naturally copy text like foo-selenium#e1234 into the copy buffer. I then immediately do

clk in .client .foo .review foo-selenium#e1234

with my old clk program, I could do

clk in review foo-selenium#e1234

which expanded to something like the first example.

It would be convenient if there were a "pre-in" hook which received all the clk in command line arguments as command line arguments. It would print a list of command line arguments to STDOUT which clk would use as its actual command line arguments.

This same mechanism could be used for catching typos too. If the pre-in script exited with an error code, the clk in would halt and the hook's STDERR would be displayed to the user.

mndrix commented 14 years ago

I wanted this again today for the exact same use case as described above

mndrix commented 14 years ago

Another use case is when I do

clk in .ndrix accounting

I only ever do accounting for Hendricks Solutions, so the .ndrix is redundant. I should be able to say

clk in accounting

to get the exact same effect