diff options
author | Dylan Araps <dylan.araps@gmail.com> | 2018-10-21 17:09:01 +1100 |
---|---|---|
committer | Dylan Araps <dylan.araps@gmail.com> | 2018-10-21 17:09:01 +1100 |
commit | 27bae93813822237765e78458a3426ab0d0ae6a2 (patch) | |
tree | ed3de5a7220eabc410b2a35fc03a68da75608452 | |
parent | f4145a3429fc0d708e3f85acd9d936cb41badaba (diff) |
clean up
-rwxr-xr-x | fff | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -39,10 +39,8 @@ hist() { } open() { - if [[ -d ${1:-/} ]]; then - l=0; refresh; PWD="${1:-/}"; get_dir; f_print - - elif [[ -f $1 ]]; then + [[ -d $1/ ]] && { l=0; refresh; PWD="${1:-/}"; get_dir; f_print; } + [[ -f $1 ]] && { case "${1##*.}" in 7z|a|apk|ar|bz2|cab|cpio|dmg|egg|gz|iso|jar|lha|mar|pea|rar|\ rpm|s7z|shar|tar|tbz2|tgz|tlz|war|whl|xpi|zip|zipx|deb|xz|pak|\ @@ -58,7 +56,7 @@ open() { *) "${EDITOR:-vi}" "$1"; printf '\e[?25l' ;; esac - fi + } } prompt() { |