From 75b666bf54cd747d1a6eea7683fb6e860836795c Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 6 Nov 2013 20:54:02 +0900 Subject: [PATCH] Update README (replace backticks with $()) As reported in #2, backticks on oh-my-zsh (with TERM=xterm*) makes fzf run twice. This should be a bug of oh-my-zsh, but for now using $() seems to be a quick workaround. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6285e5b..ad575f2 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ files excluding hidden ones. (You can override the default command with `FZF_DEFAULT_COMMAND`) ```sh -vim `fzf` +vim $(fzf) ``` If you want to preserve the exact sequence of the input, provide `--no-sort` (or @@ -136,17 +136,17 @@ Useful bash examples ```sh # vimf - Open selected file in Vim vimf() { - FILE=`fzf` && vim "$FILE" + FILE=$(fzf) && vim "$FILE" } # fd - cd to selected directory fd() { - DIR=`find ${1:-*} -path '*/\.*' -prune -o -type d -print 2> /dev/null | fzf` && cd "$DIR" + DIR=$(find ${1:-*} -path '*/\.*' -prune -o -type d -print 2> /dev/null | fzf) && cd "$DIR" } # fda - including hidden directories fda() { - DIR=`find ${1:-*} -type d 2> /dev/null | fzf` && cd "$DIR" + DIR=$(find ${1:-*} -type d 2> /dev/null | fzf) && cd "$DIR" } # fh - repeat history