mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-25 10:23:42 +01:00
Add distrobox-exported executables
This commit is contained in:
parent
0b91239209
commit
7a089aca65
24
emacs
Executable file
24
emacs
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/emacs "
|
||||||
|
|
||||||
|
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/emacs "$@"
|
||||||
|
fi
|
2
gumssh
2
gumssh
@ -47,5 +47,5 @@ selection=$(printf "%s\n" "${logins[@]}" | gum choose --limit=1)
|
|||||||
|
|
||||||
# If $selection is non-empty, pass it to the ssh -X command.
|
# If $selection is non-empty, pass it to the ssh -X command.
|
||||||
if test -n "${selection}"; then
|
if test -n "${selection}"; then
|
||||||
ssh -X "${selection}"
|
autossh -M 0 "${selection}" -X
|
||||||
fi
|
fi
|
||||||
|
24
nmap
Executable file
24
nmap
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# distrobox_binary
|
||||||
|
# name: default_root
|
||||||
|
if [ ! -f /run/.containerenv ] && [ ! -f /.dockerenv ]; then
|
||||||
|
command="/bin/distrobox-enter --root -n default_root -- /bin/nmap "
|
||||||
|
|
||||||
|
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/nmap "$@"
|
||||||
|
fi
|
24
offlineimap
Executable file
24
offlineimap
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# distrobox_binary
|
||||||
|
# name: default_root
|
||||||
|
if [ ! -f /run/.containerenv ] && [ ! -f /.dockerenv ]; then
|
||||||
|
command="/bin/distrobox-enter --root -n default_root -- /bin/offlineimap "
|
||||||
|
|
||||||
|
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/offlineimap "$@"
|
||||||
|
fi
|
24
wireshark
Executable file
24
wireshark
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# distrobox_binary
|
||||||
|
# name: default_root
|
||||||
|
if [ ! -f /run/.containerenv ] && [ ! -f /.dockerenv ]; then
|
||||||
|
command="/bin/distrobox-enter --root -n default_root -- /bin/wireshark "
|
||||||
|
|
||||||
|
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/wireshark "$@"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user