From 627d471fca17425ded63678bc84f81fbc84eaf70 Mon Sep 17 00:00:00 2001 From: romkatv Date: Sat, 26 Oct 2019 20:43:38 +0200 Subject: improve instant prompt usability, update docs and add an option to the wizard to enable it --- internal/configure.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/configure.zsh') 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 } -- cgit v1.2.3