X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=remoteusage.mdwn;h=edc63fb93c17b04881fe25c6af1b792a7d1c728e;hb=7e1c518574caddf0ec9ec70eac33a361c75aecbd;hp=bf41efb2deaee28561957405df0bcab6fa018d45;hpb=9a6ab6d79d29b3006a32f4bc2d6f57e8e359e0c5;p=notmuch-wiki diff --git a/remoteusage.mdwn b/remoteusage.mdwn index bf41efb..edc63fb 100644 --- a/remoteusage.mdwn +++ b/remoteusage.mdwn @@ -79,19 +79,18 @@ be necessary in the furture. [ -d "${CACHE}" ] || mkdir -p "${CACHE}" CMD=$1 shift - ARGS=`echo $@ | sed 's/\\$/\\\\$/g'` + # we need to a little sanitizing of msg ids so the shell + # doesn't mangle them + ARGS=`echo $@ | sed 's/[\\$\\*\\!]/\\\&/g'` $SSH_BIN $USER@$SSH_HOST $NOTMUCH_REMOTE_BIN ${CMD} ${ARGS} } notmuch_search () { - #COUNTER=1 notmuch_run search $@ | while read line; do - sleep 0.02 - #[ $((COUNTER % 3)) == "0" ] && sleep 0.03 - echo "${line}" - #COUNTER=$((COUNTER + 1)) + sleep 0.02 + echo "${line}" done } @@ -99,12 +98,12 @@ be necessary in the furture. notmuch_show () { if [ ${1} = "--format=raw" ]; then - hashed=`hash_name ${2}` - check_for_file_name ${hashed} || - notmuch_run show --format=raw ${2} > "${CACHE}/${hashed}" - cat "${CACHE}/${hashed}" + hashed=`hash_name ${2}` + check_for_file_name ${hashed} || + notmuch_run show --format=raw ${2} > "${CACHE}/${hashed}" + cat "${CACHE}/${hashed}" else - notmuch_run show $@ + notmuch_run show $@ fi }