Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download scripts/maintenance/prevent_terminal_corruption.sh from CommunityOne/open-navigator: direct link, hf CLI and curl.
- Browser
- Download file 816 Bytes
-
https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/scripts/maintenance/prevent_terminal_corruption.sh
- Command line
-
hf download hf://spaces/CommunityOne/open-navigator/scripts/maintenance/prevent_terminal_corruption.sh
-
curl -L -o prevent_terminal_corruption.sh https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/scripts/maintenance/prevent_terminal_corruption.sh
816 Bytes
| # Prevent Terminal Corruption File Creation | |
| # Add this to your shell profile (~/.bashrc or ~/.zshrc) | |
| # 1. ALWAYS disable pagers for commands that might use them | |
| export PAGER=cat | |
| export GIT_PAGER=cat | |
| export SYSTEMD_PAGER=cat | |
| # 2. Disable psql pager | |
| export PSQL_PAGER= | |
| # 3. Set safer defaults for common commands | |
| alias less='less -R' | |
| alias more='cat' | |
| # 4. Add git config to never use pager | |
| git config --global core.pager cat | |
| # 5. Function to reset terminal when corrupted | |
| fix-terminal() { | |
| reset | |
| stty sane | |
| echo "Terminal reset. Run 'cd /path/to/project' to fix working directory." | |
| } | |
| echo "✅ Terminal corruption prevention configured" | |
| echo " - Pagers disabled (PAGER=cat)" | |
| echo " - Run 'fix-terminal' if terminal gets corrupted" | |
| echo " - Always check 'pwd' before running commands" | |