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 - Adapt the installation script to remove possibly conflicting files - Ensure ~/.local/state/bash/ exists
This commit is contained in:
parent
dc154f29c7
commit
1f3fe88216
6 changed files with 167 additions and 0 deletions
25
.config/shell/logout
Normal file
25
.config/shell/logout
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/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 in SSH/terminal emulators
|
||||
if _command_exists clear; then
|
||||
clear
|
||||
printf '\e[3J' # Clear scrollback buffer in modern emulators
|
||||
fi
|
||||
|
||||
# On real Linux tty, run `clear_console` for full reset as well
|
||||
if [ -t 0 ] && [ "$(tty)" != "not a tty" ]; then
|
||||
case "$(tty)" in
|
||||
/dev/tty[0-9]*)
|
||||
if _command_exists clear_console; then
|
||||
clear_console -q
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue