aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkj-sh6042025-01-30 08:46:21 -0500
committerkj-sh6042025-01-30 08:46:21 -0500
commitd3013822c88d97a657997ca546a4b3a175f11d47 (patch)
tree451a0aea88f4b91c9a52c66e5c34b51136e873ef
parent88e73a08912d776a15a9665174d6b588858e4f8f (diff)
refactor: update aliases and abbrs
-rw-r--r--.config/fish/config.fish20
-rw-r--r--.config/shell/.zshrc10
2 files changed, 16 insertions, 14 deletions
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
index cc44221..ef5756c 100644
--- a/.config/fish/config.fish
+++ b/.config/fish/config.fish
@@ -8,11 +8,22 @@ if status is-interactive
# commands to run in interactive sessions can go here
fish_vi_key_bindings
+ # aliases
+ alias grep='grep --color=auto'
+ alias neofetch="alsi"
+ if which bat >/dev/null 2>&1
+ alias cat="bat -p"
+ end
+ if which eza >/dev/null 2>&1
+ alias ls="eza"
+ end
# abbreviations
abbr -a S "cd ~/.local/bin && ls"
abbr -a c "cal"
abbr -a d "disown"
abbr -a dots "cd ~/.local/share/.dotfiles/"
+ abbr -a egrep "grep -E"
+ abbr -a fgrep "grep -F"
abbr -a ks "killall screen"
abbr -a lgit 'lazygit'
abbr -a p "paru"
@@ -29,15 +40,6 @@ if status is-interactive
abbr -a yt-mp4 "youtube-dl -cif 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
abbr -a yt-mpv "mpv --ytdl-format="
abbr -a yt-webm "youtube-dl -cif 'bestvideo[ext=webm]+bestaudio[ext=webm]/best[ext=webm]/best'"
- # aliases
- alias egrep='grep -E'
- alias fgrep='grep -F'
- alias grep='grep --colour=auto'
- alias ls="ls --group-directories-first -h -p --color -F"
- alias neofetch="alsi"
- if which bat >/dev/null 2>&1
- alias cat="bat -p"
- end
# less termcap variables (for colored man pages)
set -gx LESS_TERMCAP_mb \e'[1;32m'
diff --git a/.config/shell/.zshrc b/.config/shell/.zshrc
index 9905316..db12b29 100644
--- a/.config/shell/.zshrc
+++ b/.config/shell/.zshrc
@@ -26,6 +26,10 @@ HISTSIZE=9999999
SAVEHIST=9999999
# aliases
+ # conditionally alias alternative applications if installed
+ command which bat >/dev/null 2>&1 && alias cat="bat -p"
+ command which eza >/dev/null 2>&1 && alias ls="eza"
+
# personal aliases
# alias echo=(command which echo)
# alias printf=(command which printf)
@@ -35,10 +39,9 @@ SAVEHIST=9999999
alias dots="cd ~/.local/share/.dotfiles/"
alias egrep='grep -E'
alias fgrep='grep -F'
- alias grep='grep --colour=auto'
+ alias grep='grep --color=auto'
alias ks="killall screen"
alias lgit="lazygit"
- alias ls="ls --group-directories-first -h -p --color -F"
alias neofetch="alsi"
alias p="paru"
alias pu="paru -Syu --noconfirm"
@@ -50,9 +53,6 @@ SAVEHIST=9999999
alias w="curl wttr.in"
alias x="startx"
- # conditionally alias cat to bat -p if bat is installed
- command which bat >/dev/null 2>&1 && alias cat="bat -p"
-
# youtube-dl aliases
alias yt-best="youtube-dl -cif 'bestvideo+bestaudio/best'"
alias yt-m4a="youtube-dl -cif 'bestaudio[ext=m4a]'"