Closed pvares closed 8 months ago
Confirmed. Having the same issue on bash.
My Steps:
inshellisense bind
-bash: /home/jim/.inshellisense/key-bindings.bash: line 1: syntax error near unexpected token `$'{\r''
'bash: /home/jim/.inshellisense/key-bindings.bash: line 1: `__inshellisense__() {
~
jim@jim-laptop-2$ file ~/.inshellisense/key-bindings.bash
/home/jim/.inshellisense/key-bindings.bash: ASCII text, with CRLF line terminators
~/.inshellisense/key-bindings.bash
file using dos2unix as @pvares did and the error goes away and it worksThanks for reporting this! It looks like the same issue as #16, #8, & #3. I have a fix in the build pipelines for the next pre-release, so that should fix it for you.
Describe the bug
When installing bindings for
zsh
(other shells haven't been tested) the file~/.inshellisense/key-bindings.zsh
is generated with windows line endings (\r\n
) causing parse errors when loading:/home/<username>/.inshellisense/key-bindings.zsh:10: parse error near '__inshellisense'
Workaround Run
dos2unix ~/.inshellisense/key-bindings.zsh
To Reproduce Steps to reproduce the behavior:
inshellisense bind
and selectzsh
source ~/.zshrc
)Expected behavior Inshellisense should generate line endings appropriate to the OS
Environment
inshellisense --version
:0.0.1-rc.1
Additional context Running
oh my zsh
, but problem appears to continue with bare zsh as well. Originalkey-bindings.zsh
file and updateddos2unix key-bindings.zsh
files are attached (file extension changed to .txt to allow upload)dos2-unix-key-bindings.zsh.txt original-key-bindings.zsh.txt