hartez / todo.txt-PowerShell

Implementation of todo.txt CLI for PowerShell

Home Page:https://hartez.github.io/todo.txt-PowerShell/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unapproved verbs warning

hartez opened this issue · comments

When importing the module, PowerShell gives the following warning:

WARNING: The names of some imported commands from the module 'todo' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.

Here are some thoughts:

Unapproved Verbs and Suggested Replacements-

Append-ToDo Edit-ToDo -append
Archive-ToDo Compress-ToDoList, Backup-ToDoList
Deprioritize-ToDo Edit-ToDo -deprioritize
Prepend-ToDo Edit-ToDo -prepend
Replace-ToDo Edit-ToDo -replace

"Approved" names can be aliased to traditional names.

Backup files into backups folder. I like structured directories: /backups/2013/01-Jan/23/ToDo-20130123-1122.txt. Backup-ToDoList would make even more sense then. You also never have to worry that you munched someone's todo file that synced itself throughout their world...

Other Suggestions
Make variables for todo file and done file closer to unique to avoid name collisions.

I found another fix for this is to call the -DisableNameChecking on import.

So Import-Module -DisableNameChecking todo no warning!

Not sure whether -DisableNameChecking is a real fix of the issue. It just suppress the message. The reason for name checking is not to annoy anybody, but to keep powershell naming consistent across all modules and to maintain easy discoverability by powershell users.
I would suggest same or similar solution that @jeffa00 already suggested. Even if cmdlets are not perfect, aliases can be used to fine-tune the experience.

That is all nice and dandy, but it assumes that there is a complete sensible set of verbs to start with. Which also flies in the face of modular programming at times.

Example:

Append-ToDo Edit-ToDo -append

from further up. That is nice - except in some scenarios append is a VERY different workflow that may be maintained separately. I lack words for a lot of things that work around application and data management and i have a number of cases where no verb is atually a proper match.

Things like data integration (move from staging to data warehouse) are simply missing. Edit... -integrate is nice, excelt it is a lot of specialized code (better in a separate cmdlet) AND...
there is a whole terminology in the applciations I maintain - which I would have to break it to keep powershell consistency.

So, yes, in general, I agree.