laktak / extrakto

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

cleanup & preserve fzf query between ctrl+{f,g} #48

Closed laur89 closed 3 years ago

laur89 commented 3 years ago
- minor bash cleanup, such as:
  - variable localization
  - use bash syntax (eg [[]] vs [])
  - improve param quoting
  - capitalize global parameters
- preserve user input query in fzf between ctrl+f & ctrl+g options by
  utilizing --print-query fzf option;
- instead of recursively calling capture(), run the command in a loop
  in capture();
- add colors to fzf header
laktak commented 3 years ago

Thanks for your PR! I appreciate your effort but you are changing a lot all at once.

What is the reason for changing all variables to upper case in the "minor bash cleanup"?

Preserving the query is a great feature but please don't change the structure (adding the loop) at the same time - it makes it hard to follow what you are doing.

Could you remove the cleanup and the loop from this PR for now?

laur89 commented 3 years ago

PR is rather large, but features are separated by commit.

What is the reason for changing all variables to upper case

It's a common convention to denote global variables.

Preserving the query is a great feature but please don't change the structure (adding the loop) at the same time - it makes it hard to follow what you are doing.

Majority of the implementation remains same, it's just the indentation-shift that makes it seem like a major change.

I'll try and break changes up further.

laur89 commented 3 years ago

Let's continue on https://github.com/laktak/extrakto/pull/49