Skip to content

Commit 38749ef

Browse files
committed
bashrc,profile: use globstar to exclude *.dpkg* from sourcing
1 parent 3be93fe commit 38749ef

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

bashrc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,6 @@
1010
[ "$BASH" ] || shopt(){ return ${shopt_def-0}; }
1111
_is_posix(){ shopt -oq posix; }
1212

13-
# System wide environment variables and startup programs should go into
14-
# /etc/profile. Personal environment variables and startup programs
15-
# should go into ~/.bash_profile. Personal aliases and functions should
16-
# go into ~/.bashrc
17-
18-
. /etc/profile
19-
20-
# Provides prompt for non-login shells, specifically shells started
21-
# in the X environment.
22-
23-
# TODO check case $- in (*i*)
24-
# Make bash append rather than overwrite the history on disk
25-
# Allows user to edit a failed hist exp.
26-
# Allows user to verify the results of hist exp.
27-
shopt -s histappend histreedit histverify
28-
HISTIGNORE='&:[bf]g:exit'
29-
HISTCONTROL='ignorespace'
30-
3113
# When changing directory small typos can be ignored by bash
3214
# Chdirs into it if command is a dir
3315
# Chdirs into $var if var not found
@@ -45,6 +27,24 @@ shopt -s checkhash
4527
# Winsize
4628
shopt -s checkwinsize
4729

30+
# Provides prompt for non-login shells, specifically shells started
31+
# in the X environment.
32+
33+
# TODO check case $- in (*i*)
34+
# Make bash append rather than overwrite the history on disk
35+
# Allows user to edit a failed hist exp.
36+
# Allows user to verify the results of hist exp.
37+
shopt -s histappend histreedit histverify
38+
HISTIGNORE='&:[bf]g:exit'
39+
HISTCONTROL='ignorespace'
40+
41+
# System wide environment variables and startup programs should go into
42+
# /etc/profile. Personal environment variables and startup programs
43+
# should go into ~/.bash_profile. Personal aliases and functions should
44+
# go into ~/.bashrc
45+
46+
. /etc/profile
47+
4848
# Colors
4949
alias l='ls -AFlh'
5050
alias ll='ls -Flh'

profile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ _IFS='
1616
' # $' \t\n'
1717
IFS='
1818
' # $'\n'
19-
for pth in $(cat /etc/paths.d/._* /etc/paths /etc/paths.d/*); do
19+
for pth in $(cat /etc/paths.d/!(*.dpkg*) /etc/paths); do
2020
case "$pth" in \#*) continue;; esac
2121
PATH="$PATH:$pth"
2222
done 2>/dev/null
2323

24-
for pth in $(cat /etc/manpaths.d/._* /etc/manpaths /etc/manpaths.d/*); do
24+
for pth in $(cat /etc/manpaths.d/!(*.dpkg*) /etc/manpaths); do
2525
case "$pth" in \#*) continue;; esac
2626
MANPATH="$MANPATH:$pth"
2727
done 2>/dev/null
@@ -38,7 +38,7 @@ export HISTFILESIZE=4096
3838
export TZ="$(readlink /etc/localtime | sed -e 's/^\.\.//g' -e 's@/usr/share/zoneinfo/@@')"
3939

4040
# Source profile scripts
41-
for script in /etc/profile.d/* ; do
41+
for script in /etc/profile.d/!(*.dpkg*) ; do
4242
case "$script" in
4343
*.csh) # No! Go away, csh!
4444
continue;;

0 commit comments

Comments
 (0)