npm autocomplete broken if prefixed by double dash (--)ZSH autocompletezsh autocomplete directoryautocomplete...

Why do banks “park” their money at the European Central Bank?

Nothing like a good ol' game of ModTen

Tex Quotes(UVa 272)

Prevent use of CNAME Record for Untrusted Domain

Was there ever a treaty between 2 entities with significantly different translations to the detriment of one party?

Is MOSFET active device?

Very slow boot time and poor perfomance

How do the Etherealness and Banishment spells interact?

Rent contract say that pets are not allowed. Possible repercussions if bringing the pet anyway?

Network helper class with retry logic on failure

Circular Reasoning for Epsilon-Delta Proof?

New Math Formula?

Showing that the limit of non-eigenvector goes to infinity

What verb is かまされる?

Duplicate instruments in unison in an orchestra

Does an atom recoil when photon radiate?

How much does Commander Data weigh?

What would make bones be of different colors?

Why in most German places is the church the tallest building?

Are modern clipless shoes and pedals that much better than toe clips and straps?

Why doesn't 'd /= d' throw a division by zero exception?

What are some interesting features that are common cross-linguistically but don't exist in English?

Notepad++ cannot print

Is "The life is beautiful" incorrect or just very non-idiomatic?



npm autocomplete broken if prefixed by double dash (--)


ZSH autocompletezsh autocomplete directoryautocomplete named directoriesDynamic zsh autocomplete for custom commandsDefine paths zsh autocomplete usesNPM fail on Debian 9Can not install npm






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I notice this when using a command that accepts additional args after a double-dash, for example:



npm test -- spec/blah-spec.js


In a raw, clean, ZSH v5.3 install, tab-completion works properly:



npm test -- spec/blah<TAB>


But, as soon as I add the following lines to my .zshrc:



autoload -U compinit && compinit
zmodload -i zsh/complist


The tab-completion in that case breaks (TAB does nothing).



Is there a way to both have custom completions and not break this use case?










share|improve this question



























  • Do you have problems with commands other than npm? Do you have the same problem without loading zsh/complist? The npm completion code is distributed with npm, not with zsh. It's changed over time, too. What's the output of which $_comps[npm] after attempting one completion?

    – Gilles
    yesterday


















0















I notice this when using a command that accepts additional args after a double-dash, for example:



npm test -- spec/blah-spec.js


In a raw, clean, ZSH v5.3 install, tab-completion works properly:



npm test -- spec/blah<TAB>


But, as soon as I add the following lines to my .zshrc:



autoload -U compinit && compinit
zmodload -i zsh/complist


The tab-completion in that case breaks (TAB does nothing).



Is there a way to both have custom completions and not break this use case?










share|improve this question



























  • Do you have problems with commands other than npm? Do you have the same problem without loading zsh/complist? The npm completion code is distributed with npm, not with zsh. It's changed over time, too. What's the output of which $_comps[npm] after attempting one completion?

    – Gilles
    yesterday














0












0








0








I notice this when using a command that accepts additional args after a double-dash, for example:



npm test -- spec/blah-spec.js


In a raw, clean, ZSH v5.3 install, tab-completion works properly:



npm test -- spec/blah<TAB>


But, as soon as I add the following lines to my .zshrc:



autoload -U compinit && compinit
zmodload -i zsh/complist


The tab-completion in that case breaks (TAB does nothing).



Is there a way to both have custom completions and not break this use case?










share|improve this question
















I notice this when using a command that accepts additional args after a double-dash, for example:



npm test -- spec/blah-spec.js


In a raw, clean, ZSH v5.3 install, tab-completion works properly:



npm test -- spec/blah<TAB>


But, as soon as I add the following lines to my .zshrc:



autoload -U compinit && compinit
zmodload -i zsh/complist


The tab-completion in that case breaks (TAB does nothing).



Is there a way to both have custom completions and not break this use case?







zsh autocomplete npm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









Gilles

571k138 gold badges1180 silver badges1692 bronze badges




571k138 gold badges1180 silver badges1692 bronze badges










asked yesterday









Elliot NelsonElliot Nelson

1113 bronze badges




1113 bronze badges
















  • Do you have problems with commands other than npm? Do you have the same problem without loading zsh/complist? The npm completion code is distributed with npm, not with zsh. It's changed over time, too. What's the output of which $_comps[npm] after attempting one completion?

    – Gilles
    yesterday



















  • Do you have problems with commands other than npm? Do you have the same problem without loading zsh/complist? The npm completion code is distributed with npm, not with zsh. It's changed over time, too. What's the output of which $_comps[npm] after attempting one completion?

    – Gilles
    yesterday

















Do you have problems with commands other than npm? Do you have the same problem without loading zsh/complist? The npm completion code is distributed with npm, not with zsh. It's changed over time, too. What's the output of which $_comps[npm] after attempting one completion?

– Gilles
yesterday





Do you have problems with commands other than npm? Do you have the same problem without loading zsh/complist? The npm completion code is distributed with npm, not with zsh. It's changed over time, too. What's the output of which $_comps[npm] after attempting one completion?

– Gilles
yesterday










0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f537074%2fnpm-autocomplete-broken-if-prefixed-by-double-dash%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f537074%2fnpm-autocomplete-broken-if-prefixed-by-double-dash%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...