mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-25 10:23:42 +01:00
Add notmuch from distrobox-export
This commit is contained in:
parent
fb597ddf29
commit
03289e5bc8
24
notmuch
Executable file
24
notmuch
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# distrobox_binary
|
||||
# name: default
|
||||
if [ ! -f /run/.containerenv ] && [ ! -f /.dockerenv ]; then
|
||||
command="/bin/distrobox-enter -n default -- /bin/notmuch "
|
||||
|
||||
for arg in "$@"; do
|
||||
if echo "${arg}" | grep -Eq "'|\""; then
|
||||
command="${command} \
|
||||
$(echo "${arg}" | sed 's|\\|\\\\|g' |
|
||||
sed 's| |\\ |g' |
|
||||
sed 's|\$|\\\$|g' |
|
||||
sed "s|'|\\\'|g" |
|
||||
sed 's|"|\\\"|g')"
|
||||
elif echo "${arg}" | grep -q "'"; then
|
||||
command="${command} \"${arg}\""
|
||||
else
|
||||
command="${command} '${arg}'"
|
||||
fi
|
||||
done
|
||||
eval ${command}
|
||||
else
|
||||
/bin/notmuch "$@"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user