Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

please merge zsh completion script #681

Closed
wants to merge 4 commits into from
Closed

please merge zsh completion script #681

wants to merge 4 commits into from

Conversation

kuno
Copy link

@kuno kuno commented Mar 7, 2011

As your suggestion, I renamed bash and zsh completion scripts.
And the zsh completion script is quite useful right now.

@kuno
Copy link
Author

kuno commented Mar 7, 2011

sorry, I forget commit with 'Closes GH-568', (committed now).

@isaacs
Copy link
Contributor

isaacs commented Mar 7, 2011

So, there are two problems with this script:

  1. The license is a bit problematic. Everything in the npm distribution must be under the same MIT license.
  2. It's a bit huge. I don't understand why this can't be boiled down to a single function that can be dropped in the .zshrc, since npm completion already does the lookup for you and prints the results to stdout. Look at the bash completion script for an example of what I'm talking about.

Doesn't zsh have some generic "complete" function that is used to call a function to complete a given command name?

@isaacs
Copy link
Contributor

isaacs commented Mar 7, 2011

Something like the output of pip completion --zsh.

@kuno
Copy link
Author

kuno commented Mar 8, 2011

about the license, I modified this file from mercurial zsh completion script. Although it was completely re-written, I still follow the origin license in order to respect the original author. If it need to be under the MIT license, should be OK.

I don't know if or not you are a zsh user, but the point is pip use old style zsh completion system, but I choice to use the NEW completion system, see the detial at http://zsh.sourceforge.net/Guide/zshguide06.html.

The old one is ok, but the new one is more powerful, also more complex, this is why the file is so big. And yet, the whole zsh completion script is not completely finished. It will continuously evolve follow the development of npm.

@isaacs
Copy link
Contributor

isaacs commented Mar 8, 2011

I think it would make more sense, then, to fork your bigger fancier zsh completion script into a separate project.

I want npm to mimic pip's completion command, and output a short simple function that a user can easily >> on their .zshrc or .bashrc and forget about. Even the existing npm-completion.sh script is way too big.

@kuno
Copy link
Author

kuno commented Mar 9, 2011

If this is your will, I'll respect it.
I'll seperate this old script as independent project, and try make a new simple one instead.

Thanks
--kuno

@isaacs
Copy link
Contributor

isaacs commented Mar 9, 2011

great!

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants