Dont allow npm to clear terminal

This commit is contained in:
Arti Zirk 2023-06-28 20:01:45 +03:00
parent 32e4427466
commit 625dae5ac2
1 changed files with 12 additions and 0 deletions

12
.zshrc
View File

@ -259,6 +259,18 @@ function gedit {
PATH=$REAL_PATH env -u VIRTUAL_ENV /usr/bin/gedit $@;
}
# NodeJS people really love to erase the terminal scrollback buffer
# running npm through cat usually solves it
# https://nodejs.org/api/tty.html#tty
# https://github.com/facebook/create-react-app/issues/2495
function npm {
(
export COLOR=1
export REACT_APP_NO_CLEAR_CONSOLE=1
/usr/bin/npm $@ | cat
)
}
# i don't like that systemd by default uses a pager
export SYSTEMD_PAGER=''