aboutsummaryrefslogtreecommitdiff
path: root/internal/configure.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-10-26 21:43:38 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-10-26 21:43:38 +0300
commit627d471fca17425ded63678bc84f81fbc84eaf70 (patch)
treec93dd440dc362e33d944916ab093fb457e118af8 /internal/configure.zsh
parentf17081ca98c9347a3e0ce1829337bfb909178ff9 (diff)
improve instant prompt usability, update docs and add an option to the wizard to enable it
Diffstat (limited to 'internal/configure.zsh')
-rw-r--r--internal/configure.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/configure.zsh b/internal/configure.zsh
index 202978f6..eb991ff1 100644
--- a/internal/configure.zsh
+++ b/internal/configure.zsh
@@ -17,7 +17,6 @@ function _p9k_can_configure() {
(( q )) || print -rP "%1F[ERROR]%f %Bp10k configure%b: $1" >&2
}
{
- [[ -t 0 && -t 1 ]] || { $0_error "no TTY"; return 1 }
[[ -o multibyte ]] || { $0_error "multibyte option is not set"; return 1 }
[[ -e $__p9k_zd ]] || { $0_error "$__p9k_zd_u does not exist"; return 1 }
[[ -d $__p9k_zd ]] || { $0_error "$__p9k_zd_u is not a directory"; return 1 }
@@ -53,6 +52,8 @@ function _p9k_can_configure() {
$0_error "terminal size too small; must be at least $__p9k_wizard_columns x $__p9k_wizard_lines"
return 1
}
+ [[ -t 0 && -t 1 ]] || { $0_error "no TTY"; return 2 }
+ return 0
} always {
unfunction $0_error
}