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.
This commit is contained in:
Junegunn Choi 2013-11-06 20:54:02 +09:00
parent 3f73554a9e
commit 75b666bf54

View File

@ -89,7 +89,7 @@ files excluding hidden ones. (You can override the default command with
`FZF_DEFAULT_COMMAND`) `FZF_DEFAULT_COMMAND`)
```sh ```sh
vim `fzf` vim $(fzf)
``` ```
If you want to preserve the exact sequence of the input, provide `--no-sort` (or If you want to preserve the exact sequence of the input, provide `--no-sort` (or
@ -136,17 +136,17 @@ Useful bash examples
```sh ```sh
# vimf - Open selected file in Vim # vimf - Open selected file in Vim
vimf() { vimf() {
FILE=`fzf` && vim "$FILE" FILE=$(fzf) && vim "$FILE"
} }
# fd - cd to selected directory # fd - cd to selected directory
fd() { 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 - including hidden directories
fda() { 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 # fh - repeat history