help / color / mirror / code / Atom feed
From: Steve Dondley <s@dondley.com>
To: zsh users <zsh-users@zsh.org>
Subject: Unable to successfully set up FZF_DEFAULT_COMMAND
Date: Sun, 29 Aug 2021 20:36:51 -0400	[thread overview]
Message-ID: <bde6607ac6749f99b3f8c42dbbbb6c8c@dondley.com> (raw)

I'm running MacOS on a fresh user install.

I'm trying to integrate the 'rg' command with fzf. The README page for 
fzf says to insert the following line into .zshrc:

RG_PREFIX="rg --column --line-number --no-heading --color=always 
--smart-case "
   fzf --bind "change:reload:$RG_PREFIX {q} || true" \
       --ansi --disabled --query "$INITIAL_QUERY" \
       --height=50% --layout=reverse

When I do add these lines, there are two problems:

1) When I reload zsh, the fzf command gets run with the rg command 
2) When I type 'echo $FZF_DEFAULT_COMMAND' at the command prompt, the 
FZF_DEFAULT_COMMAND is not set. And then when I run 'fzf', I'll just get 
the default fzf behavior.

When I try adding the "export" keyword to export the FZF_DEFAULT_COMMAND 
but that results in an error:

/Users/test/.zshrc:export:3: not valid in this context: --bind. And 
'echo $FZF_DEFAULT_COMMAND' shows just:

rg --column --line-number --no-heading --color=always --smart-case  ''

I've searched around a great deal but I'm coming up empty. Can someone 
explain why I can't get this working?

             reply	other threads:[~2021-08-30  0:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30  0:36 Steve Dondley [this message]
2021-08-30  1:26 ` Lawrence Velázquez
2021-08-30  1:51   ` Steve Dondley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bde6607ac6749f99b3f8c42dbbbb6c8c@dondley.com \
    --to=s@dondley.com \
    --cc=zsh-users@zsh.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).