From 91e671c8ae9b73664ce09bb90bd10172614be79f Mon Sep 17 00:00:00 2001 From: HDinkel <6j5fnb2xrg@snkmail.com> Date: Mon, 27 Jul 2015 12:42:32 +0200 Subject: [PATCH] MINOR: get dirname of script bin/qfc.sh to allow running qfc from arbitrary location (not necessarily ~/.qfc) --- bin/qfc.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/qfc.sh b/bin/qfc.sh index b7ce9b8..ba4b0d5 100755 --- a/bin/qfc.sh +++ b/bin/qfc.sh @@ -19,6 +19,9 @@ function get_cursor_position(){ if [[ -d ~/.qfc/ ]]; then export PATH=~/.qfc/bin:"${PATH}" +else + DIRNAME=$(dirname $0) + export PATH=$DIRNAME:"${PATH}" fi if [[ -n "$ZSH_VERSION" ]]; then