diff --git a/aliases.zsh b/aliases.zsh index d10fbb1..6509d59 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -14,6 +14,7 @@ alias .....='cd ../../../../' alias .4='cd ../../../../' alias .5='cd ../../../../..' alias hick='history | ack -i' +#alias history='history | aul' alias pu='pushd' alias po='popd' @@ -52,6 +53,12 @@ elif [[ $os == 'freebsd' || $os == 'mac' ]]; then alias ls='\ls -G -lahtr' alias l.='\ls -Gd .* -Gtr' alias updatedb='sudo /usr/libexec/locate.updatedb' + + # j4hangir: redefine mdfind and remove UserQueryParser superfluous msgs + function mdfind() { + /usr/bin/mdfind $@ 2> >(grep --invert-match ' \[UserQueryParser\] ' >&2) + } + srch() { mdfind -name $@ } @@ -75,6 +82,11 @@ cdl () { # fi #} + +function find_bundle_name() { + mdfind "kMDItemKind == 'Application'" | grep -i $1 | head -1 | xargs -I {} defaults read {}/Contents/Info CFBundleIdentifier | tee >(pbcopy) +} + opf () { if [[ $os == 'mac' ]]; then c="netstat -antvp tcp" diff --git a/init.sh b/init.sh index 67d5786..bb5dd3e 100755 --- a/init.sh +++ b/init.sh @@ -45,7 +45,6 @@ antigen apply source $DIR/.zshrc - # echo " _ _ __ _ _ __ # __/\__ _ __ (_) __ __ (_) / _| (_) ___ __| | _ \ \ # \ / | '_ \ | | \ \/ / | | | |_ | | / _ \ / _\` | (_) | |