Finished updating bashrc and others
This commit is contained in:
parent
b538219e08
commit
c041421e76
4 changed files with 56 additions and 1 deletions
4
.bash_logout
Normal file
4
.bash_logout
Normal file
|
@ -0,0 +1,4 @@
|
|||
# ~/.bash_logout: executed by bash(1) when login shell exits.
|
||||
|
||||
test -r ~/.shell-logout && source ~/.shell-logout
|
||||
|
15
.bash_profile
Normal file
15
.bash_profile
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Via https://tanguy.ortolo.eu/blog/article25/shrc
|
||||
#
|
||||
# At startup, depending on the case:
|
||||
# - run as a login shell (or with the option --login), it executes profile (or
|
||||
# bash_profile instead if it exists (only user-specific version));
|
||||
# - run as an interactive, non-login shell, it executes bashrc (the system-wide
|
||||
# version is called bash.bashrc).
|
||||
#
|
||||
# At exit, it executes ~/.bash_logout (the system-wide version is called
|
||||
# bash.bash_logout).
|
||||
# Note the funny (read: insane) non-login condition for executing bashrc: it is
|
||||
# often worked around by having the profile execute bashrc anyway.
|
||||
|
||||
[[ -f ~/.profile ]] && . ~/.profile
|
||||
|
11
.bashrc
11
.bashrc
|
@ -1,6 +1,15 @@
|
|||
# Via https://tanguy.ortolo.eu/blog/article25/shrc
|
||||
#
|
||||
# ~/.bashrc
|
||||
# At startup, depending on the case:
|
||||
# - run as a login shell (or with the option --login), it executes profile (or
|
||||
# bash_profile instead if it exists (only user-specific version));
|
||||
# - run as an interactive, non-login shell, it executes bashrc (the system-wide
|
||||
# version is called bash.bashrc).
|
||||
#
|
||||
# At exit, it executes ~/.bash_logout (the system-wide version is called
|
||||
# bash.bash_logout).
|
||||
# Note the funny (read: insane) non-login condition for executing bashrc: it is
|
||||
# often worked around by having the profile execute bashrc anyway.
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
|
27
.shell-logout
Normal file
27
.shell-logout
Normal file
|
@ -0,0 +1,27 @@
|
|||
# vim: set ft=sh sw=2 et :
|
||||
|
||||
# when leaving the console clear the screen to increase privacy
|
||||
|
||||
if [ "$SHLVL" = 1 ]; then
|
||||
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
||||
fi
|
||||
|
||||
# When leaving the console clear the screen to increase privacy. Also clear the
|
||||
# scroll-back buffer by switching to tty63 and back.
|
||||
case "$(tty)" in
|
||||
/dev/tty[0-9])
|
||||
t=$(v=`tty` ; echo ${v##*ty})
|
||||
clear
|
||||
chvt 63; chvt "$t"
|
||||
;;
|
||||
|
||||
/dev/tty[0-9][0-9])
|
||||
t=$(v=`tty` ; echo ${v##*ty})
|
||||
clear
|
||||
chvt 63; chvt "$t"
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in a new issue