Skip to content

add: native Windows support.#62

Closed
xarthurx wants to merge 4 commits intoGothenburgBitFactory:developfrom
xarthurx:develop
Closed

add: native Windows support.#62
xarthurx wants to merge 4 commits intoGothenburgBitFactory:developfrom
xarthurx:develop

Conversation

@xarthurx
Copy link
Copy Markdown

@xarthurx xarthurx commented May 2, 2019

for applications that exist in native Windows python, run wsl TaskWarrior command from native Windows cmd will work.

@xarthurx xarthurx mentioned this pull request May 2, 2019
@robgolding
Copy link
Copy Markdown
Collaborator

Hey @xarthurx thanks so much for the PR!

I wonder if we could achieve this in a more generic way through a new parameter to the TaskWarrior class? For example TaskWarrior(taskwarrior_command='wsl TaskWarrior').

That way we can support other platforms or even folks who have task installed in a non-standard location.

What do you think?

@xarthurx
Copy link
Copy Markdown
Author

xarthurx commented May 6, 2019

@robgolding Hey, thanks for the reply.
About your question, what do you mean by "non-standard location"? do you mean virtual environment?

From my perspective, since TaskWarrior is almost universal supported across unix based system, there seems to be no need for that.

And for the WSL part, it is not a programme-specific problem, but more a platform issue. So even make the command as wsl TaskWarrior, you still need to use wsl task, etc, for calling command in WSL from native Windows.

I personally prefer the flag way, in which the difference for users is just activating the different platform. (WSL or Linux).

But of course if you have more user-case in mind, there definitely will be better ways to get more general support.

@robgolding
Copy link
Copy Markdown
Collaborator

Hey @xarthurx! I mean the task binary location (e.g. if it's located at /opt/taskwarrior/bin/task or something). I'll work up an alternative PR which maybe you could test out on WSL?

robgolding added a commit that referenced this pull request May 6, 2019
Thanks @xarthurx for proposing WSL support in #62. This commit adds
support in a different way, by allowing the "task" command to be
customised (to `wsl task`, for example).
@xarthurx
Copy link
Copy Markdown
Author

xarthurx commented May 6, 2019 via email

robgolding and others added 4 commits May 6, 2019 14:45
Thanks @xarthurx for proposing WSL support in #62. This commit adds
support in a different way, by allowing the "task" command to be
customised (to `wsl task`, for example).
@xarthurx
Copy link
Copy Markdown
Author

xarthurx commented May 12, 2019

Hi @robgolding, I test your PR #63 and it works great with the custom task_command. However, an issue exist if rc file override is used:
(this is the default behaviour if .taskrc is placed inside windows user's home dir. -- tasklib will interprets the ~/.taskrc and automatically call the override func)

Based on this: https://taskwarrior.org/docs/configuration.html

= should be used instead of the original : in the lib. (it gives errors)

As I cannot add things to your PR, I appended it here.
Please feel free to use this PR or edit your PR, either works for me.

And please let me know if you have other questions.

@robgolding
Copy link
Copy Markdown
Collaborator

Thanks @xarthurx! I wonder if they use a different symbol on Unix vs Windows, because it's definitely always worked with a colon before 😅 . E.g.:

$ task rc:/
Using alternate .taskrc file /
[task next rc:/]
No matches.

However with =, I get:

$ task rc=/
[task next rc=/]

ID Age  Tag         Description                            Urg
...

One thing we can do instead, though, is use the TASKRC environment variable, which should work regardless of the platform. I'll update my PR with that so you can give it a try!

@robgolding
Copy link
Copy Markdown
Collaborator

Superseded by #63

@robgolding robgolding closed this May 13, 2019
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

Successfully merging this pull request may close these issues.

2 participants