mklabs / tabtab

tab completion helpers, for node cli programs & others. Inspired by npm completion
MIT License
365 stars 39 forks source link

`yarn global ls` removes installed completions #34

Open tadayosi opened 7 years ago

tadayosi commented 7 years ago

Using yarn I installed tabtab and yarn-completions globally:

$ sudo yarn global add tabtab
$ sudo yarn global add yarn-completions

Now you can see:

$ ll /usr/local/share/.config/yarn/global/node_modules/tabtab/.completions/
total 16K
-rw-r--r--. 1 root root 714 Oct  9  2016 gitbook.bash
-rw-r--r--. 1 root root 440 Oct  9  2016 gitbook.fish
-rw-r--r--. 1 root root 389 Oct 10  2016 gitbook.zsh
-rw-r--r--. 1 root root 696 May 25 16:16 yarn.bash

However, when I do sudo yarn global ls afterwards the installed yarn.bash disappears!!!

$ sudo yarn global ls
yarn global v0.24.5
warning No license field
info "tabtab@2.2.2" has binaries:
   - tabtab
info "yarn-completions@0.0.8" has binaries:
   - completions-yarn
Done in 1.22s.

$ ll /usr/local/share/.config/yarn/global/node_modules/tabtab/.completions/
total 12K
-rw-r--r--. 1 root root 714 Oct  9  2016 gitbook.bash
-rw-r--r--. 1 root root 440 Oct  9  2016 gitbook.fish
-rw-r--r--. 1 root root 389 Oct 10  2016 gitbook.zsh

It happens on both CentOS 7 (via yum repo / with sudo) and macOS (via brew / without sudo).

tadayosi commented 7 years ago

I'm not sure if it's a tabtab bug or yarn's though.