Skip to content

Commit

Permalink
Only show if at the start of a command line
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbn committed Mar 8, 2023
1 parent caa4fd0 commit 0ee5f6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
magic-enter
===========

A fork of the magic enter feature from [subnixr's minimal] prompt theme.
Shown when there is no command and user presses ENTER.
A fork of the magic enter feature from [subnixr's minimal] prompt theme. Shown
when there is no command at the start of a command line and user presses ENTER.

What does it show?
------------------
Expand Down
2 changes: 1 addition & 1 deletion init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _prompt_mnml_precmd() {
}

_prompt_mnml_buffer-empty() {
if [[ -z ${BUFFER} ]]; then
if [[ -z ${BUFFER} && ${CONTEXT} == start ]]; then
# draw infoline
if (( MNML_LAST_ERR )) print -Pn '%F{${MNML_ERR_COLOR}}${MNML_LAST_ERR} '
print -Pn '%(1j.%F{244}%j%f& .)%F{244}%n%f@%F{244}%m%f:'
Expand Down

0 comments on commit 0ee5f6c

Please sign in to comment.