[GTALUG] bash completion half broken on FC 27

D. Hugh Redelmeier hugh at mimosa.com
Sat Jun 30 12:41:10 EDT 2018


I'm top-posting because I don't know what to delete from your message.

[RANT}

I'm shocked and appalled by bash's intricacy.  For example,
/usr/share/bash-completion/bash_completion on my Fedora 28 system is
71853 bytes of complexity.  Sheesh.

Programming should be a synthetic field, but we're way into the
analytical domain.

[/RANT]

It's quite hard to read all this crap to figure out what is going on.
And we don't have systems similar enough to yours to duplicate the
problem.

Ideas (I suspect you already did this):

- don't "eyeball diff", be more rigorous and use real diff.

- don't just check file contents: also check permissions and
  ownership.  Also do this for each directory in the pathname of each file.

- you probably need to check more files for differences.  For example
  ~/.profile, ~/.bash_profile and friends.

- there's a slight chance that SELINUX vetoed something.  If it is
  enabled, look for reports from it.

- create a new throw-away login and see if it is similarly afflicted.

- see if the behaviour is the same when SSHed in as when logged in
  from your desktop environment

| From: Giles Orr via talk <talk at gtalug.org>
| To: GTALUG Talk <talk at gtalug.org>
| Date: Fri, 29 Jun 2018 01:39:44 +0000
| Subject: [GTALUG] bash completion half broken on FC 27
| Reply-To: Giles Orr <gilesorr at gmail.com>, GTALUG Talk <talk at gtalug.org>
| 
| I have two laptops, both running Fedora 27.  The main difference (from the
| OS point of view) is how they got to F27: the newer one was a fresh install
| at that version, whereas the other was upgraded step-by-step from F24.  The
| other difference is the package sets, which vary somewhat - but both have
| bash, bash-completion, and 'pass'.  (Since 'pass' is unsearchable, I'll
| point -> passwordstore.org - liking it so far.)
| 
| On the older machine, Bash tab completion of files and subcommands works
| fine with 'pass'.  On the newer machine, completion works for most things
| like 'dnf' and 'ls' - but not for 'pass'.  I've traced this as well as I
| could: the pass package installs
| /usr/share/bash-completion/completions/pass .  That file should be sourced
| by /usr/share/bash-completion/bash_completion which is sourced by
| /etc/profile.d/bash_completion.sh, which is in turn sourced by both
| /etc/bashrc and /etc/profile.  And my eyeball-diff says that all these
| files are essentially matched on both machines (I opened and examined the
| relevant clauses in every file named).
| 
| If I simply source /usr/share/bash-completion/completions/pass in a
| terminal, 'pass' completion works.  So I thought "I'll use
| ~/.bash_completion to source it!"  But here I found another bit of
| breakage: that file apparently doesn't get sourced (it does on the older
| machine).
| 
| I can just throw a line 'source
| /usr/share/bash-completion/completions/pass' into my own or the system's
| bashrc, but I'd rather figure out the problem.  Any suggestions?
| 
| -- 
| Giles
| https://www.gilesorr.com/
| gilesorr at gmail.com


More information about the talk mailing list