Stack Manipulation
In a given day, I find that much time is spent with meetings or quick questions that interrupt the main flow of my work. I will often need to move back to a previous task after the interruption. This lead to the addition of stack manipulation commands. These are purely for the purpose of reducing typing in certain circumstances and are not actually required for normal use of the program.
The stack
command has sub-commands to perform different actions on the stack file. Those
sub-commands are:
Display the Stack
$ rtimelog stack ls
Display items on the stack. The top task description on the stack is the one that is restarted by the resume command.
Display Top of Stack
$ rtimelog stack top
Display just the top item on the stack. This is the item that would have been restarted by the resume command.
Empty the Stack
$ rtimelog stack clear
Clear the stack file, erasing everything from the stack.
Drop Items from Top of Stack
$ rtimelog stack drop 3
Drop one or more task descriptions from top of entry stack. If no arguments are supplied, only the top item is dropped. If the argument is a number, that number of task descriptions is dropped from the stack.
Drop Items from Bottom of Stack
$ rtimelog stack keep 5
Remove all task descriptions from the stack except the top {n}
items. If no arguments are
supplied, keep the top 10 items from the stack. If the supplied argument is a positive integer, all
stack items except the n
topmost are discarded.