sorin-ionescu / prezto

The configuration framework for Zsh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Completions not working on a fresh prezto install

mpas opened this issue · comments

Description

I am struggling to get the completions to work. Did a fresh install of Prezto and was hoping that for example a simple completions like for httpie would work.

The following modules are loaded..

# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'history-substring-search' \
  'prompt'

Based on searches on Google I checked the fpath and it seems to be set correctly:

print -l $fpath
/Users/<username>/.zprezto/modules/prompt/functions
/usr/local/opt/curl/share/zsh/site-functions
/Users/<username>/.zprezto/modules/completion/external/src
/Users/<username>/.zprezto/modules/helper/functions
/Users/<username>/.zprezto/modules/utility/functions
/usr/local/share/zsh/site-functions
/usr/share/zsh/site-functions
/usr/share/zsh/5.7.1/functions

Expected behavior

When enabling completion i would expect that using $ httpie <Tab> would give me some options for the completion

Actual behavior

httpie <TAB>

results in:

$ httpie <TAB>

-- file --
<list of files in the current dir>

Versions

  • Prezto commit: [d6e1ef5]
  • ZSH version: zsh 5.8
  • OS information: Catalia 10.5.7

How did you install prezto? Most of our completions are provided by zsh-completions, so the subrepo needs to be cloned as well.

What's in $HOME/.prezto/modules/completion/external?

If it's empty you can cd to the prezto directory and run git submodule update --init

I installed it using the normal instructions, do a git clone and then

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

The completion files are in $HOME/.zprezto/modules/completion/external instead of $HOME/.prezto/modules/completion/external

ls -alg ~/.zprezto/modules/completion/external
total 120
drwxr-xr-x   12 staff    384 Feb 12 06:03 .
drwxr-xr-x    5 staff    160 Feb 12 06:03 ..
-rw-r--r--    1 staff    210 Feb 12 06:03 .editorconfig
-rw-r--r--    1 staff     58 Feb 12 06:03 .git
drwxr-xr-x    4 staff    128 Feb 12 06:03 .github
-rw-r--r--    1 staff     57 Feb 12 06:03 .gitignore
-rw-r--r--    1 staff   1999 Feb 12 06:03 CONTRIBUTING.md
-rw-r--r--    1 staff   1479 Feb 12 06:03 LICENSE
-rw-r--r--    1 staff   3647 Feb 12 06:03 README.md
drwxr-xr-x  145 staff   4640 Feb 12 06:03 src
-rw-r--r--    1 staff  29656 Feb 12 06:03 zsh-completions-howto.org
-rw-r--r--    1 staff     20 Feb 12 06:03 zsh-completions.plugin.zsh

Ah, sorry for the typo, I'm doing this from memory on my phone.

If the files are there, it's unfortunately got to be something else.

2022-02-13-1644752921_1920x1080

The commands for httpie are http and https. Try that instead.

@adabadam totally missed that one!!! It works!! Thanks!!