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

14
zshrc
View File

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