From c25f68ecbb420daa58775d1576d726c50526071d Mon Sep 17 00:00:00 2001 From: Bo Ørsted Andresen Date: Wed, 21 Mar 2007 16:37:32 +0000 Subject: Allow /etc/wgetpaste and ~/.wgetpaste to be directories populated with *.bash files. --- wgetpaste | 5 +++-- 1 file 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}" -- cgit v1.2.3