#hierarchy of commands
3 messages · Page 1 of 1 (latest)
Hi @tawdry remnant. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, you're correct. This is a known issue with Warp where the clear command runs alongside any other commands you have in the same command line. So, when you run clear && git branch && git status, the block with the output is the same as the block with the clear instead of running after. This issue has been reported in a few GitHub issues, such as issue #3776 (https://github.com/warpdotdev/Warp/issues/3776) and issue #2382 (https://github.com/warpdotdev/Warp/issues/2382).
A workaround suggested in issue #2382 (https://github.com/warpdotdev/Warp/issues/2382) is to use the CTRL-L keypress in Warp to achieve the same result as a clear command. You can also create an alias for this keypress and chain it with other commands as part of a script. Here's an example:
alias ls='ls'
alias clear='printf "\033[2J\033"'
alias cs='clear && ls'
In this example, running cs will both clear the current terminal and then run the ls command.