From 2f780fb7c50da3c63ba6a7cd3f72a227c2aa40b5 Mon Sep 17 00:00:00 2001 From: Peter Kingswell Date: Tue, 24 Nov 2020 16:19:40 -0500 Subject: [PATCH] various improvements --- lib/functions.zsh | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index fc1bcc87e..e1e74d7ac 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -242,18 +242,15 @@ lsd() { } # the ol' gfind. Doesn't take a file pattern. -function gfindall() { +function gfind-all() { fd -H -t f . -x grep --color=always -Hi ${1} } # gfind with file pattern. -function gfindfall() { +function gfind-filename-all() { fd -H -t f ".${1}" . -x grep --color=always -Hi "$@" } -alias gfind=gfindall -alias gfind-filename-all=gfindall - # the ol' gfind. Doesn't take a file pattern. function gfind() { fd -t f . -x grep --color=always -Hi ${1} @@ -261,16 +258,22 @@ function gfind() { # gfind with file pattern. function gfindf() { - fd -t f ".${1}" . -x grep --color=always -Hi "$@" + fd -t f ".${1}" . -x grep --color=always -Hi "$2" } alias gfind-filename=gfindf -alias ff='fd -t f .' -alias ffa='fd -H -t f .' +alias ff='fd -t f ' # find files +alias ffa='fd -H -t f ' # find files in horrible places -alias fd='\fd -t d .' -alias fda='\fd -H -t d .' +alias fdd='\fd -t d ' # find directories +alias fdir='fdd' + +alias fdda='\fd -H -t d ' # find directories in horrible places + +alias lg='l | grep ' # ls grep + +alias git-stash-list-all='gitk `git stash list --pretty=format:%gd`' # Launch firefox profile manager function firefox-profiles() { @@ -293,9 +296,4 @@ function kill-cloud-storage() { } -# Find directories -function fdir() { - fd -t d $1 . -} - alias fdd=fdir