-
Notifications
You must be signed in to change notification settings - Fork 85
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
Added TAB Completion in Command Line Tool Using shtab #118
Conversation
I will test this later and report... thanks a lot for the contribution!!! Highly appreciated. |
😄 You can change shtab to an optional depend, such as |
Hi @Freed-Wu, I am in the process of upgrading Does it work for you? Any help? |
To be precise, when I press TAB (eg after |
Which shell do you use? Take zsh as an example: plotext --print-completion zsh| sudo tee /usr/share/zsh/site-functions/_plotext
# maybe
plotext --print-completion zsh| sudo tee /usr/local/share/zsh/site-functions/_plotext Important Then ❯ grep _plotext ~/.zcompdump
'plotext' '_plotext' That means plotext has a completion named _plotext. If don't have Then it should work. ❯ plotext <TAB>
plotext commands
bar builds a bar plot
gif plays a gif image from path
hist builds a histogram plot
image plots an image from path
plot plots lines between consecutive data points
plotter plots a series of data points and the lines between consecutive ones
scatter plots a series of data points
video plays a video from path
youtube plays a youtube video from url |
Hi thanks for the message, I find it hard to understand it as I am fresh and new to completions. I am using
Also the command |
|
Can you |
I have just now installed bash-completion and then x264, but when I press x264 -- nothing happens... no options displayed. |
I guess your bashrc don't load bash-completion. Can you add |
Ok now it works also in my normal ubuntu terminal but it has the same limitations as Konsole... completion yes but no list of possibilities |
See iterative/shtab#86, it is a bug imported from iterative/shtab#81
|
Mmm, ok thanks then. It seems we could only wait and hope the issue gets solved. Thanks btw |
You are welcome! 😄 |
Just to add a final note: markers and colors are completed only in their first element and the code works the same as when i remove the .complete part... so I take it away for now and comment the function |
Hi @Freed-Wu , I finally updated The new version is available on GitHib for now and soon also on PyPi. To install follow the indications here. Your changes are documented here and you have been credited here. Any feedback is welcomed. Thanks a lot for your inputs and all the best, |
Sorry @Freed-Wu , as I have been warned, I had to removed the If you have any other idea, very welcomed. Thanks |
I think try:
import shtab
except ImportError:
from . import _shtab as shtab Then realize a internal module named |
However, import a new independence. If you don't mind, merge this PR and close
another PR.