laktak / extrakto

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

Use helper script to get tmux options #9

Closed ivanalejandro0 closed 7 years ago

ivanalejandro0 commented 7 years ago

This seems to be the prefered way of getting options' values on other plugins like tmux-copycat and tmux-yank.

Examples: https://github.com/tmux-plugins/tmux-yank/blob/master/scripts/helpers.sh#L34 https://github.com/tmux-plugins/tmux-copycat/blob/master/copycat.tmux#L11

Besides being similar to how other plugins do this, which eases contributors entrance, this results in more readable and shorter configs.

laktak commented 7 years ago

Looks good but could you also remove the default_* variables? The don't add much IMO.

You probably need this for getting the options in tmux-extrakto? We should move it to the scripts folder as well.

ivanalejandro0 commented 7 years ago

Sure, I've removed them. It seemed to me that they added some extra explanation on what was happening, but I think that get_tmux_option is simple enough.

I also moved the tmux-extrakto to scripts/tmux-extrakto.sh, I think is a good thing that other plugins also does to keep all together.

Let me know if we need further changes to this PR.

laktak commented 7 years ago

Great, thanks!