laktak / extrakto

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

respect FZF_DEFAULT_OPTS #78

Closed jackieli-tes closed 3 years ago

jackieli-tes commented 3 years ago

I find this one tricky.

I have my colour scheme for FZF stored in FZF_DEFAULT_OPTS. It's synced with base16-shell so I can have one command to switch the colour scheme for the terminal, vim & FZF.

However when I tried to configure extrakto with:

set -g @extrakto_fzf_tool "$HOME/.fzf/bin/fzf $FZF_DEFAULT_OPTS"

It just didn't work. After some digging I realised I started tmux directly with a keybinding in i3. So that must have skipped my .zshrc eval because it's done after tmux is started?

anyway, I find that the easiest way for me to hack this is just to add $FZF_DEFAULT_OPTS when launching the $fzf_tool in https://github.com/laktak/extrakto/blob/master/scripts/extrakto.sh#L164

Any better suggestions?

laktak commented 3 years ago

I think the easiest option would be to create a fzf-launch script where you first source your .zshrc and then run fzf.

jackieli-tes commented 3 years ago

I think the easiest option would be to create a fzf-launch script where you first source your .zshrc and then run fzf.

yes, exactly what I've done.

❯ cat ~/.fzf-zsh
#!/usr/bin/env zsh

source ~/.zprofile
$HOME/.fzf/bin/fzf $@