microsoft / inshellisense

IDE style command line auto complete
MIT License
8.24k stars 181 forks source link

MacOS: binding installed with CRLF #8

Closed dolmen closed 8 months ago

dolmen commented 8 months ago

Describe the bug Binding are installed with CRLF line endings instead of LF on MacOS. As a result zsh fails to load the binding.

To Reproduce Steps to reproduce the behavior:

  1. inshellisense bind
  2. Select bash
  3. Run:
    $ od -c ~/.inshellisense/key-bindings.bash
    0000000    _   _   i   n   s   h   e   l   l   i   s   e   n   s   e   _
    0000020    _   (   )       {  \r  \n                   i   n   s   h   e
    0000040    l   l   i   s   e   n   s   e       -   c       "   $   R   E
    0000060    A   D   L   I   N   E   _   L   I   N   E   "       -   s    
    0000100    b   a   s   h  \r  \n                   h   i   s   t   o   r
    0000120    y       -   s       $   (   i   n   s   h   e   l   l   i   s
    0000140    e   n   s   e       -   -   h   i   s   t   o   r   y   )  \r
    0000160   \n                   R   E   A   D   L   I   N   E   _   L   I
    0000200    N   E   =  \r  \n   }  \r  \n  \r  \n   b   i   n   d       -
    0000220    x       '   "   \   C   -   a   "   :       _   _   i   n   s
    0000240    h   e   l   l   i   s   e   n   s   e   _   _   '            
    0000255

Same problem with zsh.

Expected behavior The installed shell config should use LF instead of CRLF.

Environment

PrivateButts commented 8 months ago

Also happening on Ubuntu Linux when binding to zsh. Resaved the file to use LF and it worked.

cpendery commented 8 months ago

I've updated the private build pipelines such that all the file extensions will be LF instead of CRLF. Closing and this will be included in the next pre-release.