aboutsummaryrefslogtreecommitdiff
path: root/bash_completion.in
diff options
context:
space:
mode:
Diffstat (limited to 'bash_completion.in')
-rw-r--r--bash_completion.in19
1 files changed, 8 insertions, 11 deletions
diff --git a/bash_completion.in b/bash_completion.in
index a8fa219..eb6eb10 100644
--- a/bash_completion.in
+++ b/bash_completion.in
@@ -2,7 +2,7 @@
#
# bash completion script for ctct
#
-# Copyright 2015 - 2017 Einhard Leichtfuß
+# Copyright 2015 - 2018 Einhard Leichtfuß
#
# This file is part of ctct.
#
@@ -23,21 +23,18 @@
_ctct()
{
## DEFAULT SETTINGS:
+ local sysconfdir="@sysconfdir_expanded@"
+ local user_config_file="@default_user_config_file@"
local datadir="@default_datadir@"
- local system_config_dir="@default_confdir@"
- local user_config_dir="@default_user_config_dir@"
local temp
## USER SETTINGS:
- temp=$(
- test -f "$system_config_dir/config.sh" \
- && source "$system_config_dir/config.sh"
- test -f "$user_config_dir/config.sh" \
- && source "$user_config_dir/config.sh"
- echo "$datadir"
- )
- test -n "$temp" && datadir="$temp"
+ test -f "$sysconfdir/ctct_config" \
+ && source "$sysconfdir/ctct_config"
+ test -f "$user_config_file" \
+ && source "$user_config_file"
+ echo "$datadir"
local cur action opts
typeset -i i