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

Colors Not Applied To Tasks On First Run

jeffa00 opened this issue · comments

Obviously not a biggie, but the first time you run todo after starting powershell, the tasks are not assigned their colors. Subsequent runs are properly color coded by priority. I haven't looked into it, but I'm guessing the sequence in which things are loaded would be involved?

I just tried it on my system, and it seems to work fine.

How are you running PowerShell? Are you running it in the normal console, do you start it up from cmd.exe, or do you use some other shell application (like ConEmu)?

Nope, I'm vanilla PowerShell console.

I just tried it again and realized that it is actually showing the headings the first time through and the Done column as well. The second it has no headings, isn't in a table, and is colorized.

Tonight I'll try to dig deeper into what it's doing and verify it it does it on my home machine as well.

It doesn't cause any problems, so it isn't a big deal.

Found it. :-)

I had not added the import-module statement to my profile on my work machine. PS 3 (don't know about earlier) will infer the module if the module name is the same as the module directory in the modules dir. That means when I was hitting todo, it was importing it on the fly and behaving differently than if I had already imported it before calling it.

Added the import to my profile and bingo.

It didn't dawn on me that I wasn't seeing the warning about the verbs when I started the console. Once I added the import, the warning came back.