Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Better Warning messages for pueue remove #108

Closed
dhra opened this issue Aug 6, 2020 · 4 comments
Closed

Better Warning messages for pueue remove #108

dhra opened this issue Aug 6, 2020 · 4 comments
Labels
t: Feature A new feature that needs implementation

Comments

@dhra
Copy link

dhra commented Aug 6, 2020

Is your feature request related to a problem? Please describe.
There are 10 tasks in queue and we want to remove from 5 till 8 or removing specify tasks: 2,9

Describe the solution you'd like

pueue remove 5..8
pueue remove 2,9

or

pueue remove 5-8 2,9
@dhra dhra added the t: Feature A new feature that needs implementation label Aug 6, 2020
@dhra
Copy link
Author

dhra commented Aug 6, 2020

A warning message for removing a bunch of tasks maybe useful:

$ pueue remove 5-8
you are trying to remove:
task5, task6, task7, task8

Are you sure to remove tasks?[Y/n]

And an error message for removing a task which doesn't exist:

$ pueue remove 1111
error: `1111` doesn't exist in the list

@Nukesor
Copy link
Owner

Nukesor commented Aug 7, 2020

pueue remove 5..8
pueue remove 2,9

This behavior is already implemented in bash/zsh and most other shells. Simply use {5..8} instead.
With this you can do stuff like this pueue log {0..1} 4

  1. Warning/Confirmation messages can indeed be useful. However I would like to make them conditional (disable them via config).

  2. That should actually be already the case. I consider this a bug.

@Nukesor Nukesor changed the title Remove tasks range Better Warning messages for pueue remove Aug 8, 2020
@Nukesor
Copy link
Owner

Nukesor commented Aug 9, 2020

  1. Has been fixed in b578daa

@Nukesor
Copy link
Owner

Nukesor commented Aug 9, 2020

The implementation of warning messages is tracked in the linked issue.

This issue will be marked as resolved

@Nukesor Nukesor closed this as completed Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: Feature A new feature that needs implementation
Projects
None yet
Development

No branches or pull requests

2 participants