I would like nm[TAB] to expand to node_modules in zsh. Is this possible? How can it be done?

Ideally, it wouldn't be triggered if there is another completion available, such as an already existing nm directory, and only trigger if there is a node_modules folder that exists, and complete if it is a part of a path, such as cd nm/mo[TAB] -> cd node_modules/moment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.