weechat: refactor wee script
This commit is contained in:
parent
20be98e020
commit
9204cd9649
|
@ -4,8 +4,7 @@
|
||||||
# and prepends * to commands).
|
# and prepends * to commands).
|
||||||
|
|
||||||
fifos=$(echo "$HOME/.weechat/weechat_fifo_*")
|
fifos=$(echo "$HOME/.weechat/weechat_fifo_*")
|
||||||
if [ -z "$fifos" ]
|
if [[ -z "$fifos" ]]; then
|
||||||
then
|
|
||||||
>&2 echo "No FIFOs. Is weechat running?"
|
>&2 echo "No FIFOs. Is weechat running?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -21,8 +20,7 @@ rd() {
|
||||||
fi | sed '/^ *\(#\|$\)/ d;s/^/*/g'
|
fi | sed '/^ *\(#\|$\)/ d;s/^/*/g'
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$1" = "-d" ]
|
if [[ "$1" = "-d" ]]; then
|
||||||
then
|
|
||||||
shift
|
shift
|
||||||
rd $@
|
rd $@
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue