commit 06131df9f0a5f68a4b4e36eaca58afcabc64b884
parent 635fe7113405700061a5b10dd1b9355a7f3999da
Author: Matthew Carlson <matt@mcarlson.xyz>
Date: Wed, 28 Jul 2021 22:11:09 -0400
fixed search function
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.config/sh/functionrc b/.config/sh/functionrc
@@ -3,6 +3,6 @@
# functionrc
f() { fff "${@}" && cd "$(cat "${XDG_CACHE_HOME:-${HOME}/.cache}/fff/.fff_d")" || exit ; }
-s() { du -a "${HOME}" | awk '{ $1="" } { gsub("^ ", "", $0); print "\"" $0 "\"" }' | fzf | tr -d '[="=]' | open.sh ; }
+s() { du -a "${HOME}" | awk '{ $1="" } { gsub("^ ", "", $0); print "\"" $0 "\"" }' | fzf | sed -e 's/^.//' -e 's/.$//' | open.sh ; }
rands() { </dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c "${1}" ; printf '%s\n'; }
rp() { for f in *; do mv "${f}" "$(printf '%s\n' "${f}" | sed "s/${1}/${2}/g")"; done ; }