Fix exex
This commit is contained in:
parent
fcae78acf2
commit
5acfc2ad28
16
zshrc
16
zshrc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user