These two lines are output to
stderr of the shell, not of the process. You can't make them disappear from zsh.
Realizing from the comments, that you want to see the output displayed, you need to go three steps:
- To avoid the noise of starting archey in the background, you must start it from a script
- To communicate the results of archey back to the main script, you must use a tempfile or something similar
- To understand, when it has finished, you can't use
wait as it depends on the noisy background start
archey >"$1" 2>&1
/path/to/wrap-archey.sh "$1" "$2" >/dev/null 2>&1 &
/path/to/start-archey.sh "$ARCHEYOUT" "$ARCHEYFLAG" >/dev/null 2>&1
# lots of foo
while test -f "$ARCHEYFLAG"; do sleep 0.1 ; done
wrap-archey.sh will redirect the output into a tempfile, and when done remove a flagfile. This is needed for the back communication.
start-archey.sh will start wrap-archey.sh in the background, eliminating the noise in the main script and returning immediately.
.zshrc will set up flagfile and resultfile, run start-archey.sh silently in the background, then do foo, then wait for archey to complete by polling the flagfile. Then it cleans up.