From 6a49faba8d13bcec7a6020f2413dac99008c89e4 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 21 Jul 2016 17:54:34 -0400 Subject: qcd: Set config path locations Use `XDG_CONFIG_HOME` (~/.config) to store our application support files. Put our database file in our directory there. --- qcd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qcd b/qcd index a7acb3c..15f9fbf 100755 --- a/qcd +++ b/qcd @@ -1,6 +1,11 @@ # qcd # Quickly `cd` into some frequently accessed project directories +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"${HOME}/.config"} +QCD_CONFIG_DIR=${QCD_CONFIG_DIR:-"${XDG_CONFIG_HOME}/qcd"} +QCD_DATABASE_FILE=${QCD_DATABASE_FILE:-"${QCD_CONFIG_DIR}/database"} + + function qcd () { if [[ $# < 1 ]]; then echo 'Usage: qcd SHORTCUT' 1>&2 -- cgit v1.2.3