Skip to content

Commit

Permalink
feat: allow to set fzf options with tmux option @fzf-url-fzf-options
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolai Fröhlich authored and wfxr committed Jan 17, 2023
1 parent 5c3ffa7 commit e48aa22
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fzf-url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
# Email: [email protected]
# Created: 2018-04-06 12:12
#===============================================================================
get_fzf_options() {
local fzf_options
local fzf_default_options='-d 35% -m -0 --no-preview --no-border'
fzf_options="$(tmux show -gqv '@fzf-url-fzf-options')"
[ -n "$fzf_options" ] && echo "$fzf_options" || echo "$fzf_default_options"
}

fzf_filter() {
fzf-tmux -d 35% -m -0 --no-preview --no-border
eval "fzf-tmux $(get_fzf_options)"
}

open_url() {
Expand Down

0 comments on commit e48aa22

Please sign in to comment.