<div>Thanks a lot! Will give it a spin when I’m back in front of my machine tomorrow. </div><div><br></div><div>K</div><div><br></div><div id="protonmail_signature_block" class="protonmail_signature_block"><div><div>Roosna & Flak - Contemporary Dance & Music                                                                   <br></div><div><a href="http://roosnaflak.com">http://roosnaflak.com</a>                                                                                   <br></div><div>                                             <caret></caret> </div></div></div><div><br></div>On Mon, Nov 4, 2019 at 18:50, Richard Russon <<a href="mailto:rich@flatcap.org" class="">rich@flatcap.org</a>> wrote:<blockquote class="protonmail_quote" type="cite">  <br><br>Hi Kenneth,<br><br>> folder-hook . `rm -f /tmp/neomutt-arch/*`<br><br>Ah, there are a couple of problems here.<br><br>The first is quite subtle.  Your command isn't quoted.<br>Because of this, the *parser* executes the `backticked` command on startup<br>and NeoMutt sees the processed config:<br>
   folder-hook .<br><br>There's nothing after the '.' because `rm` didn't print anything.<br>Meaning you see:<br>
   Error: Too few arguments on folder-hook<br><br>Let's quote the command:<br>
   folder-hook . '`rm -f /tmp/neomutt-arch/*`'<br><br>Now, it's not executed when the hook is parsed.<br>When NeoMutt opens a folder, it processes the `backticks` first,<br>then tries to run the command, which is an empty string.<br>
   : unknown command<br><br>So, let's add a NeoMutt 'echo' command to keep it happy:<br>
   folder-hook . 'echo `rm -f /tmp/neomutt-arch/*`'<br><br>I hope that makes sense.<br><br>Cheers,
   Rich / FlatCap</blockquote><div><br></div><div><br></div>