From ca75bfef451acf25d00e24dee167e945fcfe54d9 Mon Sep 17 00:00:00 2001 From: tokiclover Date: Fri, 26 Sep 2014 20:54:53 +0200 Subject: [PATCH] modules: firefox-profile: minor update (removed NULL_GLOB in favor of (N)) --- modules/firefox-profile/functions/fhp | 11 +++++++---- modules/firefox-profile/init.zsh | 3 +-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/firefox-profile/functions/fhp b/modules/firefox-profile/functions/fhp index 192809c2..8ba3cd21 100644 --- a/modules/firefox-profile/functions/fhp +++ b/modules/firefox-profile/functions/fhp @@ -24,10 +24,13 @@ local ext=.tar.$compressor[(w)1] pushd -q "$HOME"/.mozilla/firefox || return if [[ -f $profile/.unpacked ]] { - mv -f $profile{,.old}$ext - if (( $? )) { - die "failed to override the old tarball" - return + if [[ -f $profile$ext ]] { + mv -f $profile{,.old}$ext + if (( $? )) { + die "failed to override the old tarball" + popd -q + return + } } tar -X $profile/.unpacked -Ocp $profile | $=compressor $profile$ext diff --git a/modules/firefox-profile/init.zsh b/modules/firefox-profile/init.zsh index f760fb70..70e4df01 100644 --- a/modules/firefox-profile/init.zsh +++ b/modules/firefox-profile/init.zsh @@ -15,7 +15,6 @@ function die { } setopt EXTENDED_GLOB -setopt NULL_GLOB zstyle -s ':prezto:module:firefox-profile' profile 'profile' zstyle -s ':prezto:module:firefox-profile' compressor 'compressor' @@ -27,7 +26,7 @@ if [[ -z "$compressor" ]] { zstyle ':prezto:module:firefox-profile' compressor "$compressor" } -: ${profile:=${$(print $HOME/.mozilla/firefox/*.default(/)):t}} +: ${profile:=${$(print $HOME/.mozilla/firefox/*.default(/N)):t}} if [[ -z $profile ]] { unset compressor profile zramdir zsh_hook die "null firefox home profile"