* [completion] Completion scripts not loaded from ~/.guix-profile/etc/profile
@ 2019-10-11 18:15 YOANN P
2019-10-15 2:12 ` Maxim Cournoyer
0 siblings, 1 reply; 2+ messages in thread
From: YOANN P @ 2019-10-11 18:15 UTC (permalink / raw)
To: guix-devel@gnu.org
Hi guix,
Not sure if it needs to be add to the guix documentation or directly included in "~/.guix-profile/etc/profile" generation process,
but the completion scripts provided by packages seem not to be loaded.
For example, if i only install the package "git", the completion scripts for "git" reside in "~/.guix-profile/etc/bash_completion.d/git".
But there is no loading instructions for those files in "~/.guix-profile/etc/profile".
So after sourcing "~/.guix-profile/etc/profile", a user need to loop over files in "~/.guix-profile/etc/bash_completion.d/"
and "~/.guix-profile/share/bash-completion" to source them manually because native bash/bash-completion from the user distribution
are not aware of the new completion scripts available in "~/.guix-profile/etc/bash_completion.d/" and "~/.guix-profile/share/bash-completion".
I think a "bash loop" need to be added for this purpose in the generation of "~/.guix-profile/etc/profile" and in the meantime add a section for this
inside "2.6 Application Setup" section be cause i didn't find any instructions about this on the documentation.
Regards,
Yoann
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [completion] Completion scripts not loaded from ~/.guix-profile/etc/profile
2019-10-11 18:15 [completion] Completion scripts not loaded from ~/.guix-profile/etc/profile YOANN P
@ 2019-10-15 2:12 ` Maxim Cournoyer
0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2019-10-15 2:12 UTC (permalink / raw)
To: YOANN P; +Cc: guix-devel@gnu.org
Hello,
YOANN P <yoann_mac_donald@hotmail.com> writes:
> Hi guix,
>
> Not sure if it needs to be add to the guix documentation or directly included in "~/.guix-profile/etc/profile" generation process,
> but the completion scripts provided by packages seem not to be loaded.
> For example, if i only install the package "git", the completion scripts for "git" reside in "~/.guix-profile/etc/bash_completion.d/git".
> But there is no loading instructions for those files in "~/.guix-profile/etc/profile".
> So after sourcing "~/.guix-profile/etc/profile", a user need to loop over files in "~/.guix-profile/etc/bash_completion.d/"
> and "~/.guix-profile/share/bash-completion" to source them manually because native bash/bash-completion from the user distribution
> are not aware of the new completion scripts available in "~/.guix-profile/etc/bash_completion.d/" and "~/.guix-profile/share/bash-completion".
>
> I think a "bash loop" need to be added for this purpose in the generation of "~/.guix-profile/etc/profile" and in the meantime add a section for this
> inside "2.6 Application Setup" section be cause i didn't find any instructions about this on the documentation.
>
> Regards,
> Yoann
I think was is needed is to install the 'bash-completion' package. On
the Guix System, this is was gets run at login (/etc/profile, which
sources /etc/bashrc):
--8<---------------cut here---------------start------------->8---
# The 'bash-completion' package.
if [ -f /run/current-system/profile/etc/profile.d/bash_completion.sh ]
then
# Bash-completion sources ~/.bash_completion. It installs a dynamic
# completion loader that searches its own completion files as well
# as those in ~/.guix-profile and /run/current-system/profile.
source /run/current-system/profile/etc/profile.d/bash_completion.sh
fi
--8<---------------cut here---------------end--------------->8---
I also have this line in my ~/.bashrc, and IIRC it was useful in getting
the completion to work (not sure if it's required anymore):
--8<---------------cut here---------------start------------->8---
# Source the system-wide file.
source /etc/bashrc
--8<---------------cut here---------------end--------------->8---
HTH,
Maxim
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-15 2:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 18:15 [completion] Completion scripts not loaded from ~/.guix-profile/etc/profile YOANN P
2019-10-15 2:12 ` Maxim Cournoyer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).