Skip to content

Commit

Permalink
fix(zsh): updated funtions and aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
umgbhalla committed Jan 15, 2022
1 parent ec91d0c commit b82d12f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion base/zsh/.config/zsh/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
alias -s md="grip -b"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# navigation
for i in x q qa wq qw X Q QA WQ QW ZZ quit; eval alias :${i}=\' exit\'
for i in x w q qa wq qw X Q QA WQ QW ZZ quit; eval alias :${i}=\' exit\'
alias ..='\cd ..'
alias ...='\cd ../..'
alias .f='\cd /mnt/F'
Expand Down
5 changes: 4 additions & 1 deletion base/zsh/.config/zsh/funcs.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,10 @@ fif() {
echo "Need a string to search for!";
return 1;
fi
rg --files-with-matches --no-messages "$1" | fzf $FZF_PREVIEW_WINDOW --preview "rg --ignore-case --pretty --context 10 '$1' {}"
SELECTED_FILES="$(rg --files-with-matches --no-messages "$1" | fzf $FZF_PREVIEW_WINDOW -m --preview "rg --ignore-case --pretty --context 10 '$1' {}")"
if [ -n "$SELECTED_FILES" ]; then
nvim $(echo $SELECTED_FILES)
fi
}
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Expand Down
8 changes: 4 additions & 4 deletions base/zsh/.config/zsh/profile.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function pth() {
## Eliminates duplicates in *paths
typeset -gU path cdpath fpath manpath
path=("$path[@]")
## Adds `~/.local/bin` and all subdirs to $PATH

# export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"#
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# ENVIORNMENT variables
Expand Down Expand Up @@ -132,10 +132,10 @@ pth $ANDROID_SDK_ROOT/tools/
pth $HOME/.node_modules/bin
pth $HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin
pth $HOME/.cargo/bin
pth /home/umang/.scripts/
pth $HOME/.local/share/gem/ruby/3.0.0/bin
pth $BUN_INSTALL/bin
#pth /usr/local/go/bin:$GOPATH/bin
pth /usr/local/go/bin:$GOPATH/bin
export PATH="$PATH:${$(find /home/umang/.scripts/ -type d -printf %p:)%%:}"

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# export NVM_DIR="$HOME/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
Expand Down

0 comments on commit b82d12f

Please sign in to comment.