Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 468094 - app-shells/bash: support for bashrc.d/ ?
Summary: app-shells/bash: support for bashrc.d/ ?
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gnome-3.8
  Show dependency tree
 
Reported: 2013-05-01 08:31 UTC by Pacho Ramos
Modified: 2024-03-03 22:00 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bashrc.d patch (0001-add-bashrc.d-support.patch,1.69 KB, patch)
2014-11-09 12:23 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2013-05-01 08:31:20 UTC
Per discussion in:
https://bugzilla.gnome.org/show_bug.cgi?id=697475

VTE upstream thinks we should source /etc/profiles.d/*.sh content always (login and non-login shells) as Fedora does to easily recover "open tab in previous directory" feature
-> https://bugzilla.gnome.org/show_bug.cgi?id=697475#c24

Not sure if would be possible to do that :/


Reproducible: Always
Comment 1 SpanKY gentoo-dev 2013-05-02 01:35:12 UTC
that's not going to happen.  profile.d is for login shells only, end of story.

i've debated adding bashrc.d in the past, but never had a compelling use case.  i also vaguely recall there being other aspects, but it's been so long that i can't really remember.
Comment 2 Pacho Ramos gentoo-dev 2013-05-02 07:32:18 UTC
Well, bashrc.d could also help I think, but will explain this to upstream as other people from other distributions different than Fedora are also complaining. Will keep you informed

Thanks
Comment 3 Pacho Ramos gentoo-dev 2013-05-11 07:33:05 UTC
They don't like the idea because other shells (like zsh) would need to run scripts from bashrc.d dir :/
https://bugzilla.gnome.org/show_bug.cgi?id=697475#c34
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-09 12:23:23 UTC
Created attachment 388934 [details, diff]
bashrc.d patch

Here's my patch to add bashrc.d support. If nobody has a better idea, I'll commit it today. Otherwise, please provide this better idea since people want completions to work *this* year.
Comment 5 Leho Kraav (:macmaN @lkraav) 2014-11-09 13:08:34 UTC
I can't tell for sure if you are already considering this to be needed in /etc/bash/bashrc

# https://bugs.gentoo.org/show_bug.cgi?id=338335
# Login shell, avoid duplicate profile.d run http://unix.stackexchange.com/a/26782/2847
shopt -q login_shell && return
for sh in /etc/profile.d/*.sh ; do
    [ -r "$sh" ] && . "$sh"
done
unset sh


Otherwise we're gonna be running profile.d stuff twice on login shell.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-09 20:41:42 UTC
+*bash-4.3_p30-r1 (09 Nov 2014)
+
+  09 Nov 2014; Michał Górny <mgorny@gentoo.org> +bash-4.3_p30-r1.ebuild,
+  +files/bashrc-r1:
+  Introduce support for bashrc.d directory that is sourced in bashrc by default,
+  bug #468094.
Comment 7 Ulrich Müller gentoo-dev 2014-11-10 09:05:18 UTC
So now app-shells/bash-completion-2.1-r92 blocks against all previous versions of bash, including bash-3.2* and bash-4.2* which are the official versions used in ebuilds. Changes of that scope should be discussed in -dev.

Reopening and CCing QA.