6

If I type rpm --root=/ in ZSH and then press TAB nothing happens. This works for a lot of other commands. How can I make ZSH always expand the path like in BASH?

anselm
  • 842
  • 2
  • 9
  • 22
  • 1
    As a workaround for this particular case, just drop the `=` and do `rpm --root /` – William Pursell Jun 19 '12 at 16:40
  • zsh's completion isn't as smart as bash w.r.t. `=`. It is my understanding that it needs to be defined by the completion definitions for _each_ command separately. @WilliamPursell's workaround is how I do it. Some commands require the equals sign, so I put it back after completion. If the file is one you've used in a past argument, you can complete it by hitting `Esc` and then `.` (or on some terminals, `Alt+/`). – Adam Katz Jun 01 '17 at 17:44

1 Answers1

0

It looks like you're still using Zsh's legacy completion system. To upgrade to the "new" completion system (released in the year 2000), add this to your .zshrc file:

autoload -Uz compinit
compinit

Then you'll see that pressing Tab after rpm --root=/ will give you file completions just fine.

Marlon Richert
  • 5,250
  • 1
  • 18
  • 27