I don’t know bash scripting

if [ -d ~/.bashrc.d ]; then
	for rc in ~/.bashrc.d/*; do
		if [ -f "$rc" ]; then
			. "$rc"
		fi
	done

I asked chatgpt and it said this is non standard? There is no bashrc.d directory on my home folder, I have uncommented the lines for now but dont know if this is benign or malignant

  • nublug@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    1
    ·
    12 hours ago

    seems similar to the set up for systemd snippets, where you can avoid changing default config files for systemd units and instead use a drop in file in that created .d dir to load and overwrite the defaults on boot for whatever specific thing. don’t know anything that uses this for bashrc, tho. most likely harmless, especially if there’s no created bashrc.d yet.