qnm icon indicating copy to clipboard operation
qnm copied to clipboard

fish completions command error

Open idkjs opened this issue 3 years ago • 1 comments

I tried getting the fish completions from this package and go the following result:

> qnm install-completions
could not identify package directory
[I]  ~/G/fish (master) [1]> oh oh Error: setRawMode EIO
    at ReadStream.setRawMode (tty.js:77:31)
    at Interface._setRawMode (readline.js:298:16)
    at new Interface (readline.js:258:10)
    at Object.createInterface (readline.js:95:10)
    at module.exports (/usr/local/lib/node_modules/qnm/node_modules/inquirer/lib/ui/baseUI.js:14:24)
    at new module.exports (/usr/local/lib/node_modules/qnm/node_modules/inquirer/lib/ui/prompt.js:15:8)
    at Object.promptModule [as prompt] (/usr/local/lib/node_modules/qnm/node_modules/inquirer/lib/inquirer.js:26:14)
    at /usr/local/lib/node_modules/qnm/node_modules/tabtab/src/installer.js:222:35
[I]  ~/G/fish (master) [1]> which qnm
which qnm
/usr/local/bin/qnm

I'm not sure what is going on here. Any help would be greatly appreciated. Thank you.

idkjs avatar Dec 12 '20 20:12 idkjs

If you run the command and output to a file, say ./.config/fish/completions/qnm.fish, you will see this:

c[?25l? Where do you want to setup the completion script (Use arrow keys)
❯ Nowhere. Just output to STDOUT 
  Fish config file (~/.config/fish/config.fish) 
  Fish completion directory (/Users/mandalarian/.config/fish/completions) [74D[74C[1000D[K[1A[1000D[K[1A[1000D[K[1A[1000D[K? Where do you want to setup the completion script stdout[57D[57C
[?25h

###-begin-tabtab-completion-###
function _tabtab_completion
  set cmd (commandline -opc)
  set cursor (commandline -C)
  set completions (eval env DEBUG=\"" \"" COMP_CWORD=\""$cmd\"" COMP_LINE=\""$cmd \"" COMP_POINT=\""$cursor\"" tabtab completion -- $cmd)

  for completion in $completions
    echo -e $completion
  end
end

complete -f -d 'tabtab' -c tabtab -a "(eval _tabtab_completion)"
###-end-tabtab-completion-###

[?25h

which seems to work for now if you clean it up. You just cant run any scripts against the command.

idkjs avatar Dec 12 '20 21:12 idkjs