[neomutt-users] Too few arguments on folder-hook
Richard Russon
rich at flatcap.org
Mon Nov 4 17:50:36 CET 2019
Hi Kenneth,
> folder-hook . `rm -f /tmp/neomutt-arch/*`
Ah, there are a couple of problems here.
The first is quite subtle. Your command isn't quoted.
Because of this, the *parser* executes the `backticked` command on startup
and NeoMutt sees the processed config:
folder-hook .
There's nothing after the '.' because `rm` didn't print anything.
Meaning you see:
Error: Too few arguments on folder-hook
Let's quote the command:
folder-hook . '`rm -f /tmp/neomutt-arch/*`'
Now, it's not executed when the hook is parsed.
When NeoMutt opens a folder, it processes the `backticks` first,
then tries to run the command, which is an empty string.
: unknown command
So, let's add a NeoMutt 'echo' command to keep it happy:
folder-hook . 'echo `rm -f /tmp/neomutt-arch/*`'
I hope that makes sense.
Cheers,
Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/attachments/20191104/a1b67a5a/attachment.sig>
More information about the neomutt-users
mailing list