From 2c1d2f913ba0bd7886124b573b64e7b5abf66535 Mon Sep 17 00:00:00 2001 From: Anders Damsgaard Date: Tue, 5 Mar 2019 10:29:55 +0100 Subject: [PATCH] Use find instead of du | awk --- .config/aliasrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/aliasrc b/.config/aliasrc index 69baf9ca..9ad7f57b 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -28,6 +28,6 @@ alias ka="killall" \ command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" # Use neovim for vim if present. shdl() { curl -O $(curl -s http://sci-hub.tw/"$@" | grep location.href | grep -o http.*pdf) ;} -se() { du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf | xargs -r $EDITOR ;} -sv() { vcopy "$(du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf)" ;} +se() { find ~/.scripts/* ~/.config/* -type f | fzf | xargs -r $EDITOR ;} +sv() { vcopy "$(find ~/.scripts/* ~/.config/* -type f | fzf)" ;} vf() { fzf | xargs -r -I % $EDITOR % ;}