Use -z to check if almostontop is enabled
This commit is contained in:
parent
9f7367c550
commit
c5cda7afde
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user