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

Open
leonardinius opened this Issue Apr 8, 2013 · 0 comments

Comments

Projects
None yet
2 participants

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

@zxqfox zxqfox added the evaluating label Jul 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment