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

No packages completion for zypper #1787

Closed
rominf opened this Issue Oct 31, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@rominf
Contributor

rominf commented Oct 31, 2014

As I understood (I've read zypper.fish completions file), fish should complete packages for me. It doesn't work. After pressing TAB key I instantly get files completions.

fish, version 2.1.1
openSUSE 13.1, 13.2
@zanchey

This comment has been minimized.

Show comment
Hide comment
@zanchey

zanchey Nov 2, 2014

Member

The package list is generated by RPM, which takes a long time, so the output is cached. It won't be available on the first run. Once it's generated, you should have a file at ~/.cache/.rpm-cache.$USER, and fish will complete packages from this cache.

If it's not generating or using the cache correctly, please reopen the ticket.

Member

zanchey commented Nov 2, 2014

The package list is generated by RPM, which takes a long time, so the output is cached. It won't be available on the first run. Once it's generated, you should have a file at ~/.cache/.rpm-cache.$USER, and fish will complete packages from this cache.

If it's not generating or using the cache correctly, please reopen the ticket.

@zanchey zanchey closed this Nov 2, 2014

@rominf

This comment has been minimized.

Show comment
Hide comment
@rominf

rominf Nov 2, 2014

Contributor

By some reason file was empty. I deleted it and launched a new fish session to regenerate it. I've pressed TAB and nothing happened. I've copied a line, generated cache file and completion started to work.

rpm command knows only about installed packages. How about using zypper on openSUSE?

# all packages
zypper --quiet --no-refresh search  | tail -n +4 | sed -E 's/^. \| ((\w|[-_.])+).*/\1/g' >/tmp/packages
# installed only
zypper --quiet --no-refresh search --installed-only  | tail -n +4 | sed -E 's/^. \| ((\w|[-_.])+).*/\1/g' >/tmp/packages
# uninstalled only
zypper --quiet --no-refresh search --uninstalled-only  | tail -n +4 | sed -E 's/^. \| ((\w|[-_.])+).*/\1/g' >/tmp/packages
Contributor

rominf commented Nov 2, 2014

By some reason file was empty. I deleted it and launched a new fish session to regenerate it. I've pressed TAB and nothing happened. I've copied a line, generated cache file and completion started to work.

rpm command knows only about installed packages. How about using zypper on openSUSE?

# all packages
zypper --quiet --no-refresh search  | tail -n +4 | sed -E 's/^. \| ((\w|[-_.])+).*/\1/g' >/tmp/packages
# installed only
zypper --quiet --no-refresh search --installed-only  | tail -n +4 | sed -E 's/^. \| ((\w|[-_.])+).*/\1/g' >/tmp/packages
# uninstalled only
zypper --quiet --no-refresh search --uninstalled-only  | tail -n +4 | sed -E 's/^. \| ((\w|[-_.])+).*/\1/g' >/tmp/packages

@zanchey zanchey reopened this Nov 4, 2014

@zanchey zanchey added the enhancement label Nov 4, 2014

@zanchey zanchey added this to the next-major milestone Nov 4, 2014

@zanchey zanchey modified the milestones: next-minor, next-major Nov 13, 2014

@zanchey zanchey self-assigned this Nov 13, 2014

@zanchey zanchey closed this in a6a41d1 Nov 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment