Skip to content
Snippets Groups Projects
Commit 77834a64 authored by nimrod's avatar nimrod
Browse files

Shell function to retrieve the Podman container name from inside the container.

parent 9cc07142
No related branches found
No related tags found
No related merge requests found
...@@ -192,6 +192,16 @@ ansible_all () { ...@@ -192,6 +192,16 @@ ansible_all () {
popd popd
} }
container_name() {
if [ -f /run/.containerenv ]
then
# shellcheck disable=SC1091
( . /run/.containerenv; echo "$name"; )
else
hostname -s
fi
}
ddg () { ddg () {
w3m "https://duckduckgo.com/lite/?q=$(echo "$@" | urlencode)" w3m "https://duckduckgo.com/lite/?q=$(echo "$@" | urlencode)"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment