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

Expanding projects inside quotes #284

Open
pmust opened this issue Jun 11, 2019 · 2 comments
Open

Expanding projects inside quotes #284

pmust opened this issue Jun 11, 2019 · 2 comments

Comments

@pmust
Copy link

pmust commented Jun 11, 2019

Do you want to request a feature or report a bug?
A feature, I think?

What is the current behavior?
Currently Bash completion for projects does not work inside quotes. If you encase your task in quotes (you need this for single quotes to work and parentheses etc) then you can't complete your projects by using "+mypro<tab>". Without quotes this would be completed as +myproject (assuming you have this project).

What is the expected behavior?
The project inside the quotes should be expanded just as it is without quotes.

Which versions todo.sh are you using?

Run todo.sh -V
2.11.0

Which Operating System are you using?
Windows 10 with todo.sh in WSL.

Which version of bash are you using?

Run bash --version
4.3.48(1)

@inkarkat
Copy link
Member

All supporting functions around Bash completion are tailored to single whole arguments. What you're suggesting would probably be difficult to implement (with custom word-splitting or parsing). If someone submits a simple patch, I would consider including this, but anything that doubles the current completion implementation in size would not be acceptable, especially as the test coverage of completion is not good yet.

Are you aware that you can freely mix quoted and unquoted parts in Bash? To have completion and quoted strings, you can do things like this:

todo.sh add "O'Brian wants to go to" @school "with me" +fut<Tab>

I personally have all +project and @context at the beginning of the task, and I only open a double quote after that for the actual task text.

@pmust
Copy link
Author

pmust commented Jun 15, 2019 via email

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

No branches or pull requests

2 participants