Ticket #34705: completion.patch

File completion.patch, 799 bytes (added by robsonpeixoto@…, 12 years ago)

bash_completion variant

  • Portfile

     
    55
    66name                npm
    77version             1.1.23
     8revision            1
    89categories          devel
    910platforms           darwin
    1011license             MIT
     
    3940    reinplace "s|@@NPM_PATH_JSREGEX@@|${npm_path_jsregex}|g" ${worksrcpath}/lib/update.js
    4041}
    4142
     43variant bash_completion {
     44    depends_run-append path:etc/bash_completion:bash-completion
     45    post-destroot {
     46        xinstall -d ${destroot}${prefix}/etc/bash_completion.d
     47        ln -sf ${prefix}/lib/node_modules/npm/lib/utils/completion.sh ${destroot}${prefix}/etc/bash_completion.d/npm
     48    }
     49}
     50
    4251build {}
    4352
    4453destroot.cmd        ${prefix}/bin/node ./cli.js