1
0
mirror of https://github.com/artizirk/dotfiles.git synced 2024-11-01 00:30:58 +02:00

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

12
.zshrc
View File

@ -259,6 +259,18 @@ function gedit {
PATH=$REAL_PATH env -u VIRTUAL_ENV /usr/bin/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 # i don't like that systemd by default uses a pager
export SYSTEMD_PAGER='' export SYSTEMD_PAGER=''