laktak / extrakto

extrakto for tmux - quickly select, copy/insert/complete text without a mouse
MIT License
878 stars 45 forks source link

bash cleanup #51

Closed laur89 closed 3 years ago

laur89 commented 3 years ago
laktak commented 3 years ago

Thanks!

What issues do you mean in this comment?

# note we use the superfluous 'local' keyword in front of 'captured' var;
# without it we get intermittent issues with extracto python script (when reading stdin);
laur89 commented 3 years ago

What issues do you mean in this comment?

Remove local prefix from lines 60 & 66 and cycle through ctrl+{f,g}. It's really odd why it makes a difference, but it does. Additionally try adding echo "$captured" >> /tmp/capture on line 67 (ie log out the result somewhere) and check it out - unicode characters are all messed up.

laur89 commented 3 years ago

Should we maybe open an issue for this?

laktak commented 3 years ago

I can't reproduce those issues on GNU bash, version 5.0.18(1)-release (x86_64-pc-linux-gnu)

Can you try initializing captured?

    local pane captured
    captured=""
laur89 commented 3 years ago

Even weirder, it no longer reproduces; with or without the var initialization.

laktak commented 3 years ago

OK, I'll add the initialization for now. Let me know if it shows up again.