Re: /etc/bash.bashrc not sourcing/setting HISTXXX environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 07-04-15 03:41, David C. Rankin wrote:
All,

I generally create a system-wide /etc/bash.bashrc.local file to contain history defaults. E.g.:

$ cat /etc/bash.bashrc.local
HISTCONTROL=ignoreboth:erasedups
HISTIGNORE='[ ]*:&:?'

(HISTSIZE & HISTFILESIZE are exported on a per-user basis in ~/.bashrc) I then just add a line to source it in /etc/bash.bashrc:

$ cat /etc/bash.bashrc
#
# /etc/bash.bashrc
#
<snip>
# - source /etc/bash.bashrc.local
[ -r /etc/bash.bashrc.local ] && . /etc/bash.bashrc.local

  Both files are present and readable:

$ ls -l /etc/bash.bashrc*
-rw-r--r-- 1 root root 697 Apr  6 20:01 /etc/bash.bashrc
-rw-r--r-- 1 root root 418 Mar 10 09:40 /etc/bash.bashrc.local

I do this the same way on both Arch and SuSE. Chasing a bash bug on SuSE, I would check the the environment with:

$ env | grep HIST
HISTSIZE=20000
HISTFILESIZE=20000
HISTIGNORE= *:&:?:??
HISTCONTROL=ignoreboth:erasedups

Doing a pacman update earlier to day, I just checked the environment on Arch on a whim:

$ env | grep HIST
HISTSIZE=5000
HISTFILESIZE=15000

Huh? Where is HISTIGNORE and HISTCONTROL? Is there something unique to Arch that prevents sourcing or prevents setting HISTXXX in this manner. I can't think of anything offhand that would prevent it, but it certainly isn't being set. Any ideas on why?


/etc/bash.bashrc is sourced from /etc/profile .

from man bash :
Konsole output
When bashis invoked as an interactive login shell, or as a non-interactive shell with the --loginoption, it first reads and executes commands from the file /etc/profile, if that file exists.

Verfiy your /etc/profile and are you sure you are running the command from an interactive login shell ?

LVV


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux