aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xqcd4
1 files changed, 2 insertions, 2 deletions
diff --git a/qcd b/qcd
index ebd68a4..b069963 100755
--- a/qcd
+++ b/qcd
@@ -30,7 +30,7 @@ function absolute_path () {
(cd "$(dirname '$1')" &>/dev/null && printf "%s/%s" "$PWD" "${1##*/}")
}
-function find_shortcut () {
+function shortcut_exists () {
local shortcut=$1
return $(awk '{ print $1 }' $QCD_DATABASE_FILE | grep "^${shortcut}$" >/dev/null 2>&1; echo $?)
}
@@ -51,7 +51,7 @@ function qcd () {
local path=$3
# Don't add the shortcut if it already exists
- if ! find_shortcut $shortcut; then
+ if ! shortcut_exists $shortcut; then
echo "${shortcut} $(absolute_path ${path})" >> $QCD_DATABASE_FILE
fi
;;