This commit is contained in:
Daniel Lynn 2023-03-27 17:07:36 -05:00
parent fcae78acf2
commit 5acfc2ad28
Signed by: daniel
GPG Key ID: 28496A140E180A9D

16
zshrc
View File

@ -124,20 +124,26 @@ if (( $+commands[exa] )); then
# exa explorer
exex() {
local depth=1
local old_depth=0
local min_depth=1
local max_depth=3
local exa_opts=("--color=always" "--git" "--icons" "-F" "-T")
while true; do
clear
exa $exa_opts -L$depth $@
if [[ $depth -ne $old_depth ]]; then
local old_depth=$depth
clear
exa $exa_opts -L$depth
fi
read -sk key
case $key in
h)
(( depth-- ))
[[ $depth -lt 1 ]] && local depth=1
[[ $depth -gt $min_depth ]] && (( depth-- ))
;;
l)
(( depth++ ))
[[ $depth -lt $max_depth ]] && (( depth++ ))
;;
q)
break