[neomutt-users] Too few arguments on folder-hook
rich at flatcap.org
Mon Nov 4 17:50:36 CET 2019
> 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:
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.
Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the neomutt-users