Skip to content

Instantly share code, notes, and snippets.

@giner
Created October 24, 2019 14:01
Show Gist options
  • Save giner/96133c37bf6278875b8899b90a59063a to your computer and use it in GitHub Desktop.
Save giner/96133c37bf6278875b8899b90a59063a to your computer and use it in GitHub Desktop.
BASH: add some usefulness
## bash: keep longer history
sed -i 's/^HISTSIZE=1000$/HISTSIZE=10000/' ~/.bashrc
sed -i 's/^HISTFILESIZE=2000$/HISTFILESIZE=20000/' ~/.bashrc
## Enable search through history with PgUp/PgDn
cat > ~/.inputrc << 'EOF'
$include /etc/inputrc
# alternate mappings for "page up" and "page down" to search the history
"\e[5~": history-search-backward
"\e[6~": history-search-forward
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment