summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-10-28 18:30:46 +0800
committerGuangxiong Lin <[email protected]>2022-10-28 18:30:46 +0800
commit7df8ee0b3b3159e3c704ad4bd2fe940c72ae4e21 (patch)
treea71437a14a326fab25becd895870a9295e5f1121
parent19ef65bd645bf9264ebb43ebd8c617cd5e9d16d7 (diff)
downloadwd-7df8ee0b3b3159e3c704ad4bd2fe940c72ae4e21.tar.gz
wd-7df8ee0b3b3159e3c704ad4bd2fe940c72ae4e21.tar.bz2
wd-7df8ee0b3b3159e3c704ad4bd2fe940c72ae4e21.zip
Support runtime config
-rwxr-xr-xwd6
1 files changed, 6 insertions, 0 deletions
diff --git a/wd b/wd
index 13cfde7..28cbe1c 100755
--- a/wd
+++ b/wd
@@ -18,6 +18,12 @@ cmd_wd_version () {
exit 0
}
+wdrc=${WDRC:-"$HOME/.wdrc"}
+if [ ! -f "$wdrc" ]; then
+ touch $wdrc
+fi
+source $wdrc
+
case "$1" in
help|--help|-h) shift; cmd_wd_usage "$@";;
version|--version|-v) shift; cmd_wd_version "$@";;