]> git.cworth.org Git - notmuch-wiki/blobdiff - remoteusage/124.mdwn
ditto (dc6dadf0ad4e8c86b83d927c6154e62af5c780d5)
[notmuch-wiki] / remoteusage / 124.mdwn
index 4e71af693bf5ccc6a80f4715d3478fd3fa2bf363..969e7be20a260c649f73341e09778ea12908b571 100644 (file)
@@ -21,8 +21,8 @@ Write the following code to a file, for example `remote-notmuch.sh`.
        #!/bin/bash
 
        set -eu
        #!/bin/bash
 
        set -eu
-       # To trace execution, uncomment next line.
-       #BASH_XTRACEFD=6; exec 6>>remote-errors; echo -- >&6; set -x
+       # To trace execution, uncomment next line:
+       #exec 6>>remote-errors; BASH_XTRACEFD=6; echo -- >&6; set -x
 
        : ${REMOTE_NOTMUCH_SSHCTRL_SOCK:=master-notmuch@remote:22}
        : ${REMOTE_NOTMUCH_COMMAND:=notmuch}
 
        : ${REMOTE_NOTMUCH_SSHCTRL_SOCK:=master-notmuch@remote:22}
        : ${REMOTE_NOTMUCH_COMMAND:=notmuch}
@@ -40,7 +40,7 @@ Write the following code to a file, for example `remote-notmuch.sh`.
        else ev=$?
        fi
 
        else ev=$?
        fi
 
-       # continuing here in case ssh exited with nonzero value.
+       # continuing here in case ssh exited with nonzero value
 
        case $* in
         'config get user.primary_email') echo 'nobody@nowhere.invalid'; exit 0 ;;
 
        case $* in
         'config get user.primary_email') echo 'nobody@nowhere.invalid'; exit 0 ;;
@@ -51,7 +51,7 @@ Write the following code to a file, for example `remote-notmuch.sh`.
         'search'*'--output=tags'*) echo 'errors'; exit 0 ;;
        esac
 
         'search'*'--output=tags'*) echo 'errors'; exit 0 ;;
        esac
 
-       # for unhandled command line print only to stderr...
+       # fallback exit handler; print only to stderr...
        exec >&2
 
        if ssh $SSH_CONTROL_ARGS -O check 0.1
        exec >&2
 
        if ssh $SSH_CONTROL_ARGS -O check 0.1
@@ -197,7 +197,7 @@ run
 from command line and observe output. If it looks as it should be next uncomment
 the line
 
 from command line and observe output. If it looks as it should be next uncomment
 the line
 
-        #BASH_XTRACEFD=6; exec 6>>remote-errors; echo -- >&6; set -x
+        #exec 6>>remote-errors; BASH_XTRACEFD=6; echo -- >&6; set -x
 
 in `./remote-notmuch.sh` and attempt to use it from emacs again -- and then
 examine the contents of `remote-errors` in the working directory emacs was
 
 in `./remote-notmuch.sh` and attempt to use it from emacs again -- and then
 examine the contents of `remote-errors` in the working directory emacs was