Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-complete file extension whenn addto some task #183

Open
mhalano opened this issue Jun 23, 2016 · 3 comments
Open

Auto-complete file extension whenn addto some task #183

mhalano opened this issue Jun 23, 2016 · 3 comments

Comments

@mhalano
Copy link

mhalano commented Jun 23, 2016

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 mhalano changed the title Auto-complete extension Auto-complete file extension whenn addto some task Jun 23, 2016
@mmccarn
Copy link

mmccarn commented Jul 9, 2017

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
Copy link
Contributor

chrysle commented Mar 4, 2023

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

@inkarkat
Copy link
Member

inkarkat commented Mar 4, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants