From c5cda7afdecbb6a66d1e6a02cec8ec26b33d4d7a Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 24 Apr 2018 16:14:35 +0100 Subject: [PATCH] Use -z to check if almostontop is enabled --- prompt_fresh_setup | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/prompt_fresh_setup b/prompt_fresh_setup index 1cc5a41..2479b6f 100644 --- a/prompt_fresh_setup +++ b/prompt_fresh_setup @@ -8,7 +8,6 @@ prompt_fresh_setup() { fresh_compile_git_prompt # Parse options - local almostontop=0 while getopts 'a' opt; do case $opt in a) local almostontop=1 ;; @@ -23,7 +22,7 @@ prompt_fresh_setup() { # cause lines before the prompt to disappear. add-zsh-hook precmd fresh_line_one - if [ $almostontop -eq 1 ]; then + if [ -z $almostontop ]; then # Hook to clear the screen then prints the prompt with previous command at # the top of the screen. add-zsh-hook preexec fresh_almostontop