Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

How to add two empty lines before and after output (stdout) of any command?



Now i'm using for it:
precmd () { print -P "%E\n" }
preexec () { print -P "%E" }

Hit enter at prompt:
#
\n
#

Command with output to stdout:
#ls
\n
dev bin home etc ...
\n
#

And almost all is ok. But if command without output than i get two
empty lines together - it's not looks fine.
# cd /
\n
\n
#

Is it possible to solve this problem?



Messages sorted by: Reverse Date, Date, Thread, Author