From ac6ff3b9f8fb6f1e59bbdf6e6b497819d870f261 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Wed, 13 Dec 2023 12:21:25 -0500 Subject: [PATCH] No paging with bat 'cat' alias Add hearch/hsearch --- fake_home/.shell_aliases | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fake_home/.shell_aliases b/fake_home/.shell_aliases index f922434..1ea5674 100755 --- a/fake_home/.shell_aliases +++ b/fake_home/.shell_aliases @@ -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"