Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fish completions command error #58

Open
idkjs opened this issue Dec 12, 2020 · 1 comment
Open

fish completions command error #58

idkjs opened this issue Dec 12, 2020 · 1 comment

Comments

@idkjs
Copy link

idkjs commented Dec 12, 2020

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
Copy link
Author

idkjs commented Dec 12, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant