cespare / reflex

Run a command when files change
MIT License
3.35k stars 135 forks source link

Clear screen before re running a command. #65

Open bubunyo opened 5 years ago

bubunyo commented 5 years ago

When the watched files in a folder changes, it runs the command without clearing the screen. It makes results from the latest run commands very dirty.

Can a simple clear screen command be invoked, before a new command is run?

aslafy-z commented 4 years ago

You can get this behavior by running the clear command before your own command, like below:

reflex -r '\.txt$' -- sh -c 'clear; run_my_command'
oderwat commented 3 years ago

I want to clear the screen and clear the scrollback buffer and use this for go server projects:

reflex -s -g '*.go' -- sh -c "printf '\033[2J\033[3J\033[1;1H' && make run"