j-bennet / wharfee

A CLI with autocompletion and syntax highlighting for Docker commands.
BSD 3-Clause "New" or "Revised" License
657 stars 41 forks source link

Refresh completions manually #131

Closed amjith closed 8 years ago

amjith commented 8 years ago

Is there a way to trigger the auto-completion refresh manually?

I created an image outside of wharfee and I'm trying to run it but I don't see it in the list. Is there a way to trigger the completion refresh?

j-bennet commented 8 years ago

@amjith Yes, there's a refresh command.

amjith commented 8 years ago

When I try that I get this error:

Version: 0.7
Home: http://wharfee.com
wharfee> refresh
volumes is not available for version < 1.21
wharfee>
j-bennet commented 8 years ago

Ah, that's definitely a bug. Will fix.

j-bennet commented 8 years ago

@amjith In fact, this should have been handled with this commit:

https://github.com/j-bennet/wharfee/commit/847c69c9b306917034386404afe244d2a75671c3

and you're using 0.7 already. What does your pip freeze say?

amjith commented 8 years ago

I'm using 0.7. Here's my pip freeze:

(wharfee) ↪ pip freeze
You are using pip version 7.0.3, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
click==6.2
configobj==5.0.6
docker-py==1.7.0
fuzzyfinder==1.0.0
pexpect==4.0.1
prompt-toolkit==0.57
ptyprocess==0.5.1
py-pretty==1
Pygments==2.1.1
requests==2.9.1
six==1.10.0
tabulate==0.7.5
wcwidth==0.1.6
websocket-client==0.35.0
wharfee==0.7
wheel==0.24.0
j-bennet commented 8 years ago

As a side note, your list of images should be refreshed anyway, because this happens before refreshing volumes, where it hiccups because your server version does not support volume commands. But the error message is definitely annoying, especially since it should have been squashed by that decorator. I can't reproduce it, but I'll try to mock it.

j-bennet commented 8 years ago

So I traced the error, and in fact the error is handled. It just prints this out as a warning. I'm going to change it to simply log a warning, because it looks like something broke, but it didn't. :)

j-bennet commented 8 years ago

This is now fixed in master.