From 627104f60c5b0e2557786b1b6374694a9d504ca2 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 28 Apr 2022 11:57:21 +0300 Subject: [PATCH] Escape and unescape shell functions. --- .bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bashrc b/.bashrc index 31ae43f..bf2bdab 100644 --- a/.bashrc +++ b/.bashrc @@ -98,6 +98,7 @@ alias deinstalled="dpkg --get-selections | awk 'BEGIN {exitcode=1}; \$2==\"deins alias detectproxy='w3m http://detectportal.firefox.com/success.txt' alias diff='diff --unified' alias dpkglog="grep -v 'status\\|trigproc\\|configure' /var/log/dpkg.log" +alias escape='printf "%q"' alias gcc='gcc --std=c99 -Wall -Wextra -Werror -pedantic' alias gen-mac='hexdump -n5 -e '\''"02" 5/1 ":%02X" "\n"'\'' /dev/urandom' alias gen-ssh-config="rc_make .ssh/config" @@ -307,6 +308,10 @@ toux () { chmod +x "$@" } +unescape () { + echo "$@" | xargs +} + __prompt () { local exitstatus="$?" local runduration endtime pre_prompt -- GitLab