Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#49148 - [fzf] fzf.bash is not sourced

Attached to Project: Community Packages
Opened by Samgarr (Samgarr) - Saturday, 30 April 2016, 09:22 GMT
Last edited by Pierre Neidhardt (Ambrevar) - Wednesday, 04 May 2016, 23:21 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Pierre Neidhardt (Ambrevar)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
fzf.bash profile is not sourced, because /etc/profile source only *.sh profiles in /etc/profile.d. After renaming fzf.bash to fzf.sh works okay.


Additional info:
$ uname -a
Linux wrk 4.5.1-1-ARCH #1 SMP PREEMPT Thu Apr 14 19:19:32 CEST 2016 x86_64 GNU/Linux

$ pacman -Qi fzf
Name : fzf
Version : 0.12.0-1

Steps to reproduce:

This task depends upon

Closed by  Pierre Neidhardt (Ambrevar)
Wednesday, 04 May 2016, 23:21 GMT
Reason for closing:  Fixed
Comment by Pierre Neidhardt (Ambrevar) - Monday, 02 May 2016, 01:28 GMT
I created a new user with default login shell (bash) and renamed fzf.bash to fzf.sh. For some reason, fzf is not active on startup, but if I source it manually, or if I resource /etc/profile it works.
The OP claims it works. One of us is making a mistake.

Anyhow, I believe that fzf.bash and fzf.zsh should not belong to /etc/profile.d which is meant to be generic and sourced by different shells. /etc/profile.d is usually needed to update PATH automatically.
I'd rather move fzf.bash and fzf.zsh to their respective /usr/share folders.

What would be those folders by the way? There is /usr/share/zsh, but no "keybindings" subfolder. I do not know any such folder for bash.
Comment by Doug Newgard (Scimmia) - Monday, 02 May 2016, 01:35 GMT
Ambrevar, are you using a display manager? Some of them don't source /etc/profile, or don't source it correctly.
Comment by Pierre Neidhardt (Ambrevar) - Monday, 02 May 2016, 02:21 GMT
You are right, there is an issue with the LXDM since it works when I connect from a TTY, but still: the PATH get sets properly (perl, plan9) when started from LXDM, which means /etc/profile gets sourced, as /etc/lxdm/Xsession testifies.
One clue: this Xsession script is a "/bin/sh" script, while fzf.bash calls for the full bash capabilities. Could this be the issue? I cannot test it just now, will do later.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 03 May 2016, 21:08 GMT
This is by design. You should source that file manually from there. We don't want to add intrusive stuff like fzf automatically to your shell. Everything is as it should be. However, I do agree with the reasoning that this stuff is better moved somewhere else. I'll move it to/usr/share.
Comment by Pierre Neidhardt (Ambrevar) - Wednesday, 04 May 2016, 01:17 GMT
Move which file where? What is by design?
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 04 May 2016, 01:24 GMT
Pierre, please check your mail.
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 04 May 2016, 22:57 GMT
Well this seems fixed?
Comment by Pierre Neidhardt (Ambrevar) - Wednesday, 04 May 2016, 23:21 GMT
Indeed.

Loading...