Add configuration for bash
- Add ~/.bashrc + Configure on how the `history` works + Enable nicer `cd` and globbing behavior + Enable tab completion, even for aliases + Add some more stuff from Debian's ~/.bashrc - Add ~/.bash_logout clearing the screen - Add stubs for ~/.bash_login and ~/.bash_profile that redirect to ~/.profile - Ensure ~/.local/state/bash/ exists
This commit is contained in:
parent
4fedbdb3a9
commit
f2fb31a404
8 changed files with 185 additions and 5 deletions
23
.config/shell/logout
Normal file
23
.config/shell/logout
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# When logging out of a machine, clear the screen to increase privacy
|
||||
|
||||
|
||||
if [ "$SHLVL" = 1 ]; then # ~ if on the outermost shell instance
|
||||
|
||||
# Clear screen and scrollback without a `terminfo` lookup
|
||||
# because `clear` fails on hosts that do not know `$TERM`
|
||||
printf '\033[H\033[2J\033[3J'
|
||||
|
||||
# On a real Linux `tty`, run `clear_console` for a full reset also
|
||||
if [ -t 0 ]; then
|
||||
case "$(tty)" in
|
||||
/dev/tty[0-9]*)
|
||||
if _command_exists clear_console; then
|
||||
clear_console -q
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
fi
|
||||
Loading…
Reference in a new issue