todo.txt-cli icon indicating copy to clipboard operation
todo.txt-cli copied to clipboard

Auto-complete file extension whenn addto some task

Open mhalano opened this issue 8 years ago • 3 comments

The file extension should be guess when adding a new task on a non-default file. The idea is become this command possible:

todo.sh addto someday "TODO ITEM"

The script should look for the file someday.txt in the path. Same for move|mv command.

mhalano avatar Jun 23 '16 17:06 mhalano

You can get "mv" to check for "txt" files like this:

    [ -f "$src" ] || src="$src.txt"
    [ -f "$src" ] || die "TODO: Source file $src does not exist."
    [ -f "$dest" ] || dest="$dest.txt"
    [ -f "$dest" ] || die "TODO: Destination file $dest does not exist."

mmccarn avatar Jul 09 '17 01:07 mmccarn

@inkarkat Would this behaviour be appreciated? Otherwise this can also be closed.

chrysle avatar Mar 04 '23 15:03 chrysle

I'm all for small usability improvements (and I would have just implemented it right away, except that I won't do any new development until the way too long backlogs gets cleared (ping @karbassi)), so I'd like to keep this one open. That defaulting should also apply to mv|move, as it also accepts a DEST argument.

PS: Thanks for looking over our old issues @chrysle; this is much appreciated!

inkarkat avatar Mar 04 '23 16:03 inkarkat