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

Contexts not expanding #255

Open
stueja opened this issue Jul 6, 2018 · 7 comments
Open

Contexts not expanding #255

stueja opened this issue Jul 6, 2018 · 7 comments

Comments

@stueja
Copy link

stueja commented Jul 6, 2018

Do you want to request a feature or report a bug?
A bug.

What is the current behavior?
Entering "@" and hitting "tab" does not expand the contexts.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Enter t add +project @ and hit tab.

What is the expected behavior?
Like with +, see a list of contexts.

Which versions todo.sh are you using?

Run todo.sh -V
DEV_VERSION

Which Operating System are you using?
Arch Linux

Which version of bash are you using?

Run bash --version
4.4.23

Note: I sent this to the mailing list, no answer so far.

@pabgan
Copy link

pabgan commented Jul 9, 2018

I guess you did, but just in case: Have you added complete -F _todo t to todo_completion file in todo-txt directory?

@stueja
Copy link
Author

stueja commented Jul 10, 2018

Hey @pabgan , yes, I have. Everything else is expanding properly. Only the contexts are not.

@inkarkat
Copy link
Member

That's strange; if +project completion is working, @context should, too. Do you actually have contexts in your todo.txt; do you get output from

todo.sh command listcon

@stueja
Copy link
Author

stueja commented Jul 20, 2018

Yes, I do have contexts, and todo.sh command listcon outputs them.

More interestingly, either I made a mistake in my original post, or it now partly works:
todo.sh add @<tab> outputs, indeed the list of contexts. E. g.:

[stueja@host ~]$ todo.sh add @
@daily       @calendar    @linux       @monthly     @online

However, expansion does not work:
todo.sh add @lin<tab> will not expand to @linux. Whereas todo.sh add +pro<tab> will well expand to +project

@sjdennis
Copy link

sjdennis commented Sep 7, 2018

I am seeing command expansion working, but neither projects nor contexts working. For instance:
t li expands to t list.
But t add +ca will not expand to +camp, nor will @ca expand.

t listproj and t listcon both work as expected, returning lists of projects and contexts in todo.txt.

Using version 2.11.0 on Ubuntu 16.04
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)

@l00kanio
Copy link

I had the same issue as @stueja wrote. Check if there is 'shopt -s hostname' in your .bashrc file.
If yes => comment it out and have fully functional autocompletion with todotxt :-)

@sjdennis
Copy link

I have no such line in my .bashrc unfortunately, so that doesn't help in my case. Thanks for the suggestion though!

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

5 participants