coa icon indicating copy to clipboard operation
coa copied to clipboard

Shell completion code fails on win32 (in bash/msys/git env)

Open leonardinius opened this issue 11 years ago • 0 comments

As per http://bem.info/tools/bem/installation/ I 'm running bem completion, which fails with

$ bem completion
Error: shell completion not supported on windows
    at Cmd.module.exports (c:\Users\leonids.maslovs\AppData\Roaming\npm\node_modules\bem\node_modules\coa\lib\completion.js:19:11)
    at exports.Cmd.Cmd._do (c:\Users\leonids.maslovs\AppData\Roaming\npm\node_modules\bem\node_modules\coa\lib\cmd.js:429:22)
From previous event:
    at Cmd.exports.Cmd.Cmd._do (c:\Users\leonids.maslovs\AppData\Roaming\npm\node_modules\bem\node_modules\coa\lib\cmd.js:424:14)
    at Cmd.exports.Cmd.Cmd.do (c:\Users\leonids.maslovs\AppData\Roaming\npm\node_modules\bem\node_modules\coa\lib\cmd.js:471:17)
    at Cmd.exports.Cmd.Cmd.run (c:\Users\leonids.maslovs\AppData\Roaming\npm\node_modules\bem\node_modules\coa\lib\cmd.js:459:22)
    at Object.<anonymous> (c:\Users\leonids.maslovs\AppData\Roaming\npm\node_modules\bem\bin\bem:6:23)

I appears the problem is with ./blob/master/lib/completion.js#L18-23

If I comment it out - it works perfectly well and generated autocomplete code works for me (.bashrc). In my opinion - completion.js either should comment it out completely or should check for execution environment (e.g. bash, msys etc ..). What's you opinion on this? If the later is the case, I could try to comeup with pull-request (though I'm unfamiliar with nodejs thing and that might be a personal challenge to some degree ;) )

PS: following environment variables are available:

MACHTYPE=i686-pc-msys
OSTYPE=msys

leonardinius avatar Apr 08 '13 21:04 leonardinius