summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2018-10-21 17:09:01 +1100
committerDylan Araps <dylan.araps@gmail.com>2018-10-21 17:09:01 +1100
commit27bae93813822237765e78458a3426ab0d0ae6a2 (patch)
treeed3de5a7220eabc410b2a35fc03a68da75608452
parentf4145a3429fc0d708e3f85acd9d936cb41badaba (diff)
clean up
-rwxr-xr-xfff8
1 files changed, 3 insertions, 5 deletions
diff --git a/fff b/fff
index ba9ec4f..cb01902 100755
--- a/fff
+++ b/fff
@@ -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() {