X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=remoteusage.mdwn;h=3e9a9f71957740aaa45c06238f20162000fe52f1;hb=981da2981cd1fa7c20d0b1139b27b2cbf031ff28;hp=24d28ef043a269b241658ebed76f20de7d983061;hpb=b3de4a8c0ee9beda92ef391c6e916df8b19624f3;p=notmuch-wiki diff --git a/remoteusage.mdwn b/remoteusage.mdwn index 24d28ef..3e9a9f7 100644 --- a/remoteusage.mdwn +++ b/remoteusage.mdwn @@ -79,21 +79,18 @@ be necessary in the furture. [ -d "${CACHE}" ] || mkdir -p "${CACHE}" CMD=$1 shift - # we need to a little sanitizing of msg ids so the shell + # we need to a little sanitizing of msg ids so the shell # doesn't mangle them - ARGS=`echo $@ | sed 's/\\$/\\\\$/g'` + 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 } @@ -101,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 }