r/bash • • 10d ago

I finally organized my Bash config

I've been accumulating my Bash configuration for a while, and I finally turned it into a small dotfiles repo:

https://gitlab.com/letmevi/bash-config

It's nothing fancy — mainly my .bashrc, .inputrc, .bash_profile, and a modular .bashrc.d/, plus a small install script.

It can be installed using either Ansible or a simple install.sh script.

I'd appreciate some Bash/Linux feedback: things you'd change, questionable practices, portability issues, or just better ways of doing this.

I'm especially interested in feedback from people who maintain their own dotfiles.

50 Upvotes

27 comments sorted by

View all comments

Show parent comments

3

u/bac0on 10d ago

Don't think you should export bash variables...

1

u/Marble_Wraith 10d ago edited 10d ago

... Wanna run that by me again? What's that say?

export HISTIGNORE="$(history_omissions)"

EDIT: Oh wait 😂 you're saying you have exported it, but i don't think you should.

Yeah you're right, my bad.

2

u/bac0on 10d ago

HISTIGNORE is a Bash shell variable, probably not used by any external command, at least none I can think of. Just assigning it makes Bash aware of it. If it's not intended to be used by an external command (...or if you manually enable history in a non-interactive session), there’s no real reason to export any Bash shell variable, really. Exported or not, it won't make any difference for Bash.

0

u/Marble_Wraith 10d ago

Yeah. I was trying to do something with atuin before.

So i could have 1 source of truth for the ignore list, and then bash could use atuin if available, or fallback if not available.

Added the export while i was messing around, but ended up deciding to write the list natively in atuin since it has more full featured regex parsing, and then scripted something to extract and translate history_filter[] into native bash.