fredrikekre / jlpkg

A command line interface (CLI) for Pkg, Julia's package manager.
MIT License
92 stars 4 forks source link

tab completion doesn't work #18

Closed yakir12 closed 3 years ago

yakir12 commented 3 years ago

for me. I tried jlpkg --project= and then <TAB> inside a folder with a toml file, but nada. I tried a few other obvious things, but alas. I have jlpkg v1.3.2 installed (via Julia, not the tarball). I already have bash-completion installed, or is that the problem?

julia> versioninfo()
Julia Version 1.5.2
Commit 539f3ce943 (2020-09-23 23:17 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: AMD Ryzen Threadripper 2950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, znver1)
Environment:
  JULIA_NUM_THREADS = 16
fredrikekre commented 3 years ago

Do any completions work or is it specifically after --project?

yakir12 commented 3 years ago

No, none of the examples you gave in the Discourse post work.

fredrikekre commented 3 years ago

Then it seems like it didn't install correctly. Can you check if you have something like this

# Bash completion for jlpkg
if [[ -f ~/.bash_completion.d/jlpkg-completion.bash ]]; then
    . ~/.bash_completion.d/jlpkg-completion.bash
fi

in your bashrc file for example? And that the file ~/.bash_completion.d/jlpkg-completion.bash exists.

yakir12 commented 3 years ago

I don't have that file. Wait, installing this changes my bashrc? I just added .julia/bin to my path in my bashrc.

yakir12 commented 3 years ago
yakir@eira:~$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.2 (2020-09-23)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

(@v1.5) pkg> st
Status `~/.julia/environments/v1.5/Project.toml`
  [6e4b80f9] BenchmarkTools v0.5.0
  [12aac903] BinaryBuilder v0.2.6
  [89398ba2] LocalRegistry v0.3.0
  [14b8a8f1] PkgTemplates v0.7.13
  [c46f51b8] ProfileView v0.6.7
  [295af30f] Revise v3.1.6
  [c4c688b2] jlpkg v1.3.2

julia> import jlpkg; jlpkg.install(force=true)
[ Info: Installed jlpkg to `~/.julia/bin/jlpkg`.

julia> 
yakir@eira:~$ ls .bash*
.bash_history  .bash_logout  .bashrc
fredrikekre commented 3 years ago

The completions is a separate thing; jlpkg.install_completion.

yakir12 commented 3 years ago

facepalm, as explained here: https://github.com/fredrikekre/jlpkg#install-shell-completion sorry for the noise and thank you for the package!