Created
October 8, 2020 04:57
-
-
Save StefanBRas/eeccc360e732096a86aa7581abb5f9a2 to your computer and use it in GitHub Desktop.
Using todoist cli without having to type long id numbers - 1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias todoistl='unbuffer todoist --color list | cut -c 21- | nl' | |
todoist_number () { | |
todoist list | sed -n "$1p" | grep -Po '^\d{10}+' | cat | |
} | |
todoistc () { | |
todoist close $(todoist_number $1) | |
} | |
todoists () { | |
todoist show $(todoist_number $1) | |
} | |
todoistd () { | |
todoist delete $(todoist_number $1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running
todoistl
will then create a list like this:These shorter ids can then be used with
todoistc
,todoists
,todoistd
to close, show and delete tasks.For example:
And now that task is closed.