Delapouite / kakoune-buffers

Ease navigation between opened buffers
http://kakoune.org
67 stars 8 forks source link

Bad substitution when dash is used for sh #16

Closed CharlesGueunet closed 3 years ago

CharlesGueunet commented 4 years ago

Hello,

First of all, thanks for this nice plugin. I have use dash as my /bin/sh as dash is POSIX compliant but way faster than bash. I seems however that this break the pick-buffer command. The list of buffer stay empty and the debug buffer tells me:

shell stedrr: <<<
sh: 16: Bad substitution
>>>

We may want to explicitely use #!/bin/bash or to use a POSIX compliant substitution instead.

I am writing this quickly, I will take more time to investigate when I can.

Charles

cmusser commented 3 years ago

Right, it fails because the ${parameter:offset:length} is a bash/ksh construct. #19 fixes this by using the cut command to do the string array slicing that produces the buffer id.

cmusser commented 3 years ago

now that #18 and #19 are merged, this works better. Can you test and see if it works for you as well?

CharlesGueunet commented 3 years ago

Yep, this works as intended now :)
Thanks a lot !