various fixes
[distro-setup] / .bash_profile
1 # man bash covers everything comprehensively of course. i use ~/.bash_profile
2 # to source bashrc, and .profile just echos that the normal bash startup process
3 # is not happening. I don't source bashrc in posix mode based on debian's
4 # default, and posix mode is quirky, doesn't seem worth figuring it out This
5 # setup ensures no distro can override anything, as they occasionally do things
6 # I don't like. For example, debian's root .profile spamms with "mesg n"when
7 # there is no tty. The mesg n ensures the terminal is not writable by other
8 # users, but it is that way without the mesg n, and google search, and debian
9 # wiki search, /usr/share/doc search gives no justification for it, and it's not
10 # in fedora, so I'm pretty confident that it is useless redundant security, plus
11 # it is purposefully in a user startup file, not a system one, so intended for
12 # the user to change.
13
14 # History related options first, or else
15 # we risk screwing up history history. And this is duplicated
16 # in ~/.bash_profile just for good measure
17 # history number. History expansion is good.
18 PS4='$LINENO+ '
19 # history file size limit, set to unlimited.
20 # this needs to be different from the default because
21 # default HISTFILESIZE is 500 and could clobber our history
22 HISTFILESIZE=
23 # max commands 1 session can append/read from history
24 HISTSIZE=1000000
25 # the time format display when doing the history command
26 # also, setting this makes the history file record time
27 # of each command as seconds from the epoch
28 HISTTIMEFORMAT="%Y-%m-%d %I:%M %p "
29 # consecutive duplicate lines dont go in history
30 HISTCONTROL=ignoredups
31 # works in addition to HISTCONTROL to do more flexible things
32 # it could also do the same things as HISTCONTROL and thus replace it,
33 # but meh. dunno why, but just " *" does glob expansion, so use [ ] to avoid it.
34 HISTIGNORE='pass *:[ ]*:otp *:oathtool *'
35
36
37 [[ -f ~/.bashrc ]] && . ~/.bashrc
38
39 # ensure no bad programs appending to this file will have an affect
40 return 0