aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Cabergs <charles.cabergs@colruytgroup.com>2023-09-27 13:18:44 +0200
committerCharles Cabergs <charles.cabergs@colruytgroup.com>2023-09-27 13:18:44 +0200
commit2c7be2b3f5b68ecb6d55097e97dccbeb58d12246 (patch)
tree87e79e41833e10da005c6f9a5fdf671af12c1b62
parent5892a1abd64c99cd35be47e5ae3cb01f207c1d8c (diff)
downloaddotfiles-2c7be2b3f5b68ecb6d55097e97dccbeb58d12246.tar.gz
dotfiles-2c7be2b3f5b68ecb6d55097e97dccbeb58d12246.tar.bz2
dotfiles-2c7be2b3f5b68ecb6d55097e97dccbeb58d12246.zip
Change fish alias for ls=eza and cat=bat if those program are installed
-rw-r--r--config/fish/config.fish21
1 files changed, 16 insertions, 5 deletions
diff --git a/config/fish/config.fish b/config/fish/config.fish
index fa2f40f..dfefe8e 100644
--- a/config/fish/config.fish
+++ b/config/fish/config.fish
@@ -115,10 +115,14 @@ if status is-interactive
alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml'
# alias nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings
- if [ "$(uname)" = 'Linux' ]
- alias ls='ls --color=auto -Fh'
+ if command -qv eza
+ alias ls='eza --git --git-repos --mounts --classify --icons'
else
- alias ls='ls -G -Fh'
+ if [ "$(uname)" = 'Linux' ]
+ alias ls='ls --color=auto -Fh'
+ else
+ alias ls='ls -G -Fh'
+ end
end
abbr ll 'ls -l'
abbr la 'ls -A'
@@ -126,13 +130,20 @@ if status is-interactive
abbr lss 'ls -Ssh'
# tree
- alias tree 'tree -FC'
+ if command -qv eza
+ alias tree='ls -T'
+ alias ti="ls -T --git-ignore"
+ else
+ alias tree 'tree -FC'
+ alias ti="tree --matchdirs -I __pycache__ -I node_modules -I '*.o' -I build"
+ end
abbr t 'tree'
abbr ta 'tree -a'
abbr t1 'tree -L 1'
abbr t2 'tree -L 2'
abbr t3 'tree -L 3'
- alias ti="tree --matchdirs -I __pycache__ -I node_modules -I '*.o' -I build"
+
+ command -qv bat && alias cat='bat'
# git
abbr ga 'git add'