No paging with bat 'cat' alias

Add hearch/hsearch
This commit is contained in:
Sage Vaillancourt 2023-12-13 12:21:25 -05:00
parent fbed79f63f
commit ac6ff3b9f8
1 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
#!/bin/bash
function hearch {
history 0 | sed 's/[0-9 ]*//' | grep "$@"
}
alias hsearch='hearch'
function fin {
find -iname "*$@*"
}
@ -35,7 +41,7 @@ function ww {
}
if command -v bat; then
alias cat="bat"
alias cat="bat -p"
fi
export FZF_DEFAULT_COMMAND='fd --type f'
alias fzf="fzf --preview 'bat --style=numbers --color=always {}'"
@ -89,7 +95,7 @@ alias termrc='vim ~/.config/xfce4/terminal/terminalrc'
# Use `grepr` for a recursive, case-insensitive, and filtered grep
# alias grepr="grep -RInsi --color=auto --exclude-dir=.git --exclude=tags"
# alias grepr='grep -RInsi --color=auto --exclude-dir=.git --exclude-dir=banana_pi_kernel --exclude-dir={bpi_build_scripts, storm_dox, sam_dox} --exclude=tags --exclude=\*.{ko, o}'
alias grepr='grep -RIns --color=auto --exclude-dir=.git --exclude-dir=venv --exclude-dir=node_modules --exclude=tags --exclude-dir=build'
alias grepr='grep -RIns --color=auto --exclude-dir=.git --exclude-dir=venv --exclude-dir=node_modules --exclude=tags --exclude-dir=build --exclude-dir=.idea'
alias grepi='grepr -i'
alias apt="sudo apt"