todotxt / todo.txt-cli

☑️ A simple and extensible shell script for managing your todo.txt file.
http://todotxt.org
GNU General Public License v3.0
5.6k stars 715 forks source link

Auto-complete file extension whenn addto some task #183

Open mhalano opened 8 years ago

mhalano commented 8 years ago

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.

mmccarn commented 7 years ago

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."
chrysle commented 1 year ago

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

inkarkat commented 1 year ago

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!