aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2020-11-27 21:29:51 -0500
committertdro <tdro@users.noreply.github.com>2020-11-27 21:29:51 -0500
commit4965b1eddd3963c877f7c4c0a38c767fe8e20c25 (patch)
treef6c020db05e8c8c7da9a1e672735d1a5792e9556 /.bashrc
parent0fc0e1154fd4d8ed54c857a760e44642df333e50 (diff)
downloaddotfiles-4965b1eddd3963c877f7c4c0a38c767fe8e20c25.tar.gz
dotfiles-4965b1eddd3963c877f7c4c0a38c767fe8e20c25.tar.bz2
dotfiles-4965b1eddd3963c877f7c4c0a38c767fe8e20c25.zip
.bashrc: Add shellquote function
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index 696811b..e712296 100644
--- a/.bashrc
+++ b/.bashrc
@@ -121,5 +121,8 @@ history-remove-duplicates() { awk '!visited[$0]++' "$HOME/.bash_history" | spong
# extract docker container as rootfs
docker-rootfs() { id=$(docker run -d "$1" /bin/true) && docker export "$id" -o "$2.tar" && docker container rm "$id"; }
+# https://til.simonwillison.net/bash/escaping-a-string
+shellquote() { printf '%q\n' "$(cat)"; }
+
# swallow
swallow() { "$@" & disown; exit; }