utilies

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d6cd0c22335c360b1c51b9e96d8e6f741f298f71
parent a24489c75697fb99a6769d70993e00a723b2b261
Author: Taco-C <perian.forod@gmail.com>
Date:   Wed,  1 Jul 2020 23:18:29 +0200

Add dugrep

Diffstat:
Adugrep | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/dugrep b/dugrep @@ -0,0 +1,13 @@ +#!/bin/sh + +# Find all files with the .$1 extention, lets you choose one, then exec with $2. + +file=`du -a $HOME --exclude=".*" 2>/dev/null | grep "\.$1$" | cut -f2 | rofi -dmenu -theme sidebar -p :` + +[ "$file" = "" ] && exit + +[ "$2" = "$EDITOR" ] && [ "$3" = "-" ] && $TERMINAL -e "$EDITOR \"$file\"" && exit + +"$2" "$file" + +#xargs -r -d "\n" "$2"