dotfiles/.config/neomutt/scripts/dirpicker
2025-09-21 17:34:27 +02:00

10 lines
263 B
Bash
Executable file

#!/bin/sh
tmpfile=$HOME/.config/neomutt/tmpdir
if \[ -z "$1" \]; then
yazi --cwd-file $tmpfile &&
echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<save-entry>\""$0"\"<enter>"}' $tmpfile)" >$tmpfile
elif \[ $1 == "clean" \]; then
rm $tmpfile
fi