From ad8ec7f38725ec7d6f592b93a4aae74f488a19aa Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 29 Nov 2013 13:40:31 +0900 Subject: [PATCH] Encourage use of function instead of alias (exportability) --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0dee291..88e00e7 100644 --- a/README.md +++ b/README.md @@ -328,14 +328,17 @@ If you're running Ruby 1.9 or above, you can improve the startup time with - `time ruby --disable-gems ~/bin/fzf -h` - 0.025 sec -Define fzf alias with the option as follows: +You can define fzf function with the option as follows: ```sh -alias fzf='ruby --disable-gems ~/bin/fzf' +fzf() { + ruby --disable-gems ~/bin/fzf "$@" +} +export -f fzf ``` -This is automatically set up in your .bashrc and .zshrc if you use the bundled -[install](https://github.com/junegunn/fzf/blob/master/install) script. +However, this is automatically set up in your .bashrc and .zshrc if you use the +bundled [install](https://github.com/junegunn/fzf/blob/master/install) script. ### Incorrect display on Ruby 1.8