commit 6197ca3f557c9aaa401ddeec1ef4f21e75e7386e
parent 21a3118fbb4bad90988fca0d2697ee93730fe0eb
Author: jacobs-github <JacobDoesLinux@protonmail.com>
Date: Tue, 25 Feb 2020 13:49:11 -0800
added logs location, shortcut to pager, history search function, and working directory function
Diffstat:
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/aliases/.aliases b/aliases/.aliases
@@ -18,6 +18,9 @@ alias pacman='pacman-c'
# broot
source /home/jacob/.config/broot/launcher/bash/br
+# locations
+alias log='cd ~/data/logs/'
+
# etc
alias ncmpcpp='ncmpcpp -q'
alias screenshots='sxiv -t ~/media/screenshots/'
@@ -30,11 +33,11 @@ alias gd='git add . ; git diff --cached'
alias gwg='xdotool getwindowgeometry "$( xdotool getactivewindow )"'
alias h='history 0'
-# 2 char
+# 1-3 char
alias ra='ranger'
alias pa='pacman'
alias nv='nvim'
-
+alias l="$PAGER"
# functions
@@ -71,5 +74,12 @@ function daily(){
}
function hs(){
- history 0 | grep "$@" | tail
+ if [ -n "$2"]; then
+ history 0 | grep "$1" | tail
+ else
+ history 0 | grep "$1" | tail -n "$2"
+ fi
+}
+wd() {
+ echo "$PWD" | sed "s/\/home\/$USER/~/g"
}