1
0
Fork 0
mirror of https://github.com/zdharma-continuum/zinit-configs.git synced 2025-01-31 04:08:16 +01:00
zinit-configs/psprint/functions/psls

21 lines
376 B
Bash

# DESC: `ls` or `ls -A`, depending on [[ -d .git ]]
ls=exa
[[ "$PWD" != "${PWD%Dropbox*}" ]] && echo -e '\x1b[5m<Dropbox>\x1b[0m'
if [[ ! -d _darcs && ! -d .git ]]; then
# Normal
$ls "$@"
return
fi
if [[ "$PWD" = "$HOME" ]]; then
# In $HOME - still normal
$ls "$@"
return
fi
# Full listing if in a git/darcs repository
$ls -a "$@"
# vim:ft=zsh:et