summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Ørsted Andresen <bo.andresen@zlin.dk>2007-03-21 16:37:32 +0000
committerBo Ørsted Andresen <bo.andresen@zlin.dk>2007-03-21 16:37:32 +0000
commitc25f68ecbb420daa58775d1576d726c50526071d (patch)
treef05ae8140bdb7aa0ddc9ab80165ad37d1faffc7c
parentb3a6f85e3f38a431760951de930680f2c6622a51 (diff)
downloadwgetpaste-c25f68ecbb420daa58775d1576d726c50526071d.tar.gz
Allow /etc/wgetpaste and ~/.wgetpaste to be directories populated with *.bash files.
-rwxr-xr-xwgetpaste5
1 files changed, 3 insertions, 2 deletions
diff --git a/wgetpaste b/wgetpaste
index 0fbcefa..513c03b 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -92,8 +92,9 @@ osl_REGEX=('s|^\(http://[^/]\+/\)\([0-9]\+\)$|\1pastebin.php?dl=\2|')
#
# Likewise if get_from_clipboard() is defined as a function in one of those files it will be
# called to retrieve input from your clipboard when --xcut is used.
-[[ -f /etc/wgetpaste ]] && . /etc/wgetpaste
-[[ -f ~/.wgetpaste ]] && . ~/.wgetpaste
+for f in {/etc/,~/.}wgetpaste{,/*.bash}; do
+ [[ -f "${f}" ]] && . "${f}"
+done
DEFAULT_NICK="${DEFAULT_NICK:-$(whoami)}"
DEFAULT_SERVICE="${DEFAULT_SERVICE:-rafb}"
DEFAULT_LANGUAGE="${DEFAULT_LANGUAGE:-Plain Text}"