Skip to content
New issue

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

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

Already on GitHub? # to your account

Support list or string for default_command config #384

Closed

Conversation

alexdavid
Copy link

Fixes #348

default_command can now be either a string (as before):

default_command = flush

or a list which is passed directly to argv:

default_command = --color, never, list, --startable

Let me know if you want me to add any documentation around this, and if so, where

@alexdavid alexdavid force-pushed the support-list-default-command branch from c4f16a9 to d69fc52 Compare April 18, 2020 17:20
@alexdavid
Copy link
Author

Failing tests seem to be unrelated to my change. Looks like master is failing on its own: #385

@WhyNotHugo
Copy link
Member

Hmm... True, master seems to have broken. I'm guessing some upstream lib recently changed. Lemme look into that. 🤔

Copy link
Member

@WhyNotHugo WhyNotHugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again. Thanks for contributing! :)

I've fixed master via #387, so you can merge/rebase and CI should work. Looks like a recent change in click 7.1 broke tests.

This is a very welcome improvement, so thanks for addressing it.

Can you please update the docs too? Also, feel free to add yourself to AUTHORS. Thanks!

@alexdavid alexdavid force-pushed the support-list-default-command branch 2 times, most recently from f91777c to 9d5cf7e Compare April 19, 2020 21:32
@alexdavid
Copy link
Author

Rebased & test are working now. Thanks!

For documentation, I'm not seeing any existing documentation for default_command. Would you like me to add a section to docs/source/configure.rst?

@WhyNotHugo
Copy link
Member

Documentation is rendered in the Configuring page, but is actually extracted from the file that defines these settings. That would be the right place for it.

@alexdavid
Copy link
Author

I got super wrapped up with other things for the past few weeks. I updated the documentation, but wasn't sure how to denote that the option could be a string or list. I think it's fair to mark it as a list since the config parsing library coerces a list of size one into a string anyway:

default_command = list, --reverse

becomes a list
vs

default_command = list

is a string.

What are your thoughts?

@alexdavid alexdavid force-pushed the support-list-default-command branch from d0b52d2 to 5019f02 Compare May 14, 2020 03:44
@alexdavid alexdavid force-pushed the support-list-default-command branch from 5019f02 to b2a924b Compare June 16, 2020 04:30
@alexdavid alexdavid closed this Jun 16, 2020
@alexdavid alexdavid force-pushed the support-list-default-command branch from b2a924b to 6f6f7f5 Compare June 16, 2020 04:37
@alexdavid
Copy link
Author

Ugh github closed my PR for resetting my branch back to master trying to figure out why the tests are failing again

@alexdavid alexdavid reopened this Jun 16, 2020
@alexdavid alexdavid force-pushed the support-list-default-command branch 2 times, most recently from d9e43a2 to b2a924b Compare June 16, 2020 04:41
@WhyNotHugo
Copy link
Member

I think documenting it as a list is probably best, since that's the most flexible way of using it. Don't worry too much if the ability to use a string isn't too obviously reflected.

Base automatically changed from master to main March 9, 2021 18:59
@strk
Copy link

strk commented Jul 25, 2024

It's a pity to see this PR stuck, I was considering using it to get a default list sorting ( see GH-558 )

@alexdavid are you planning to get back to this or should I consider re-filing it under my name ?

@WhyNotHugo
Copy link
Member

Things like default_command = "list --sort due --no-reverse" work on the latest version.

Arguments are split on space, which I guess shouldn't be an issue for real-life usages?

@strk
Copy link

strk commented Jul 25, 2024

I'm running todoman, version 4.1.0, from repository of Debian 12 - what version is latest version ? What's the recommended way to upgrade ? Should this PR be closed then ?

@strk
Copy link

strk commented Jul 25, 2024 via email

@WhyNotHugo
Copy link
Member

WhyNotHugo commented Jul 25, 2024

Latest is v4.4.0, from Oct 2023. You can ping the Debian devs package maintainer for an update; there have been no breaking changes since v4.0.0.

If that leads nowhere, try using pipx.

@WhyNotHugo WhyNotHugo closed this Jul 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

default_command fails with command with modifiers
3 participants