summaryrefslogtreecommitdiff
path: root/sfeed_opml_export
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2023-12-09 21:51:45 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2023-12-09 21:52:08 +0100
commit63308527f5197ddbcad6b06c5c1bbaf12f997e57 (patch)
tree8299da46bec290cfc3a2701c966146c3a3b5fde8 /sfeed_opml_export
parentda8adbc02e4667a68077e5f0cab8548e2bb81c1b (diff)
improve compatibility with zsh as a non-interactive shell
In zsh the variables $path and $status are special. https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-path https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-status (No promises I will keep up with this insanity in the future though)
Diffstat (limited to 'sfeed_opml_export')
-rwxr-xr-xsfeed_opml_export8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfeed_opml_export b/sfeed_opml_export
index 7c96d5d..6420d5e 100755
--- a/sfeed_opml_export
+++ b/sfeed_opml_export
@@ -7,16 +7,16 @@ loadconfig() {
if [ "$1" != "" ]; then
# get absolute path of config file required for including.
config="$1"
- path=$(readlink -f "${config}" 2>/dev/null)
+ configpath=$(readlink -f "${config}" 2>/dev/null)
else
# default config location.
config="$HOME/.sfeed/sfeedrc"
- path="${config}"
+ configpath="${config}"
fi
# config is loaded here to be able to override $sfeedpath or functions.
- if [ -r "${path}" ]; then
- . "${path}"
+ if [ -r "${configpath}" ]; then
+ . "${configpath}"
else
printf "Configuration file \"%s\" cannot be read.\n" "${config}" >&2
echo "See the sfeedrc.example file or the sfeedrc(5) man page for an example." >&2