#1008257 lyx: bash-completion not working

Package:
lyx
Source:
lyx
Description:
document processor
Submitter:
Hernán Gustavo Solari
Date:
2022-06-18 16:21:05 UTC
Severity:
normal
Tags:
#1008257#5
Date:
2022-03-25 12:39:54 UTC
From:
To:
The bash-complete script does not work. It calls "have lyx" but have is not a
program. Commenting out the line in /usr/share/lyx/scripts/bash-completion
it can be sourced, but bash-completion dos not load it "on demand". The link
/usr/share/bash-completion/completions/lyx -> ../../lyx/scripts/bash_completion

is in place. However,
source /usr/share/bash-completion/completions/lyx
complete -F _lyx lyx

make it work.

#1008257#10
Date:
2022-03-25 13:21:18 UTC
From:
To:
Strange "have()" should have been defined in /usr/share/bash-completion/bash_completion
which should be called via /etc/bash_completion

But it does not work here either. Not completion expert, but I see bunch of other scripts
using "have" as well so I wonder whether this is wider issue.

Pavel

#1008257#15
Date:
2022-03-25 13:45:22 UTC
From:
To:
Thanks for the prompt reply.

FIXED!
I am attaching the script.

The other scripts use "_have". And at the end of the script, for
example in evince, the completion command is given.

Test. Launch an xterm running bash.
complete -p |grep lyx
returns nothing
lyx <space><tab><tab>
gives list corresponding to 'ls *lyx'
complete -p |grep lyx
outputs: complete -F _lyx lyx


Same patern than, for example, evince.

Tanks
       Hernán


El Fri, 25 Mar 2022 14:21:18 +0100
Pavel Sanda <sanda@lyx.org> escribió:

#1008257#20
Date:
2022-03-25 15:30:28 UTC
From:
To:
I think the end of script should be different though.
See attached. Does this script work the way you expect?

Pavel

#1008257#25
Date:
2022-03-25 16:53:53 UTC
From:
To:
I work as well as the other.
The important thing is to tell "complete" the function it has to use
(-F _lyx) when it receives the command "lyx"

H

El Fri, 25 Mar 2022 16:30:28 +0100
Pavel Sanda <sanda@lyx.org> escribió:

#1008257#30
Date:
2022-03-26 10:38:33 UTC
From:
To:
The fix was committed to upstream and will be fixed in 2.4.
Pavel

#1008257#39
Date:
2022-06-18 16:19:55 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
lyx, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1008257@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dr. Tobias Quathamer <toddy@debian.org> (supplier of updated lyx package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 18 Jun 2022 17:45:40 +0200
Source: lyx
Architecture: source
Version: 2.3.6.1-1
Distribution: unstable
Urgency: medium
Maintainer: Dr. Tobias Quathamer <toddy@debian.org>
Changed-By: Dr. Tobias Quathamer <toddy@debian.org>
Closes: 1002821 1008257 1012994
Changes:
 lyx (2.3.6.1-1) unstable; urgency=medium
 .
   [ Pavel Sanda ]
   * d/copyright: Mythes was actually moved, not removed.
 .
   [ Dr. Tobias Quathamer ]
   * New upstream version 2.3.6.1
     - Remove patch for Wayland, has been applied upstream
     - Add patch to fix bash completion script. (Closes: #1008257)
     - Add patch to fix FTBFS with GCC 12. (Closes: #1012994)
     - Add patch to fix String/Bytes Problem in layout2layout.py.
       (Closes: #1002821)
   * Update upstream's GPG key and remove unneeded signatures
   * gbp.conf: Use DEP-14 branch names in git repository
   * Update to Standards-Version 4.6.1, no changes needed
   * Convert tabs in d/copyright to spaces
Checksums-Sha1:
 50f0ff298b35f9647febdf549fda18a572ffa916 2436 lyx_2.3.6.1-1.dsc
 73d64c6b59576120cfd6415ebd3cd2ddfe0d42ce 16242608 lyx_2.3.6.1.orig.tar.xz
 00d6a49759e7dd1c818bca94368fa2c8feeee2bb 488 lyx_2.3.6.1.orig.tar.xz.asc
 b1e630f287c2a3091d3adf8a1af4ed1b8f28e130 31208 lyx_2.3.6.1-1.debian.tar.xz
 24a6fbd08e03ea38c87dfad4cd443c34d6a7af10 12237 lyx_2.3.6.1-1_amd64.buildinfo
Checksums-Sha256:
 7366c1336a8fd07dbf6dcaa98af7d40d9caf7e8237677d58f9b8f6a0eadd3bec 2436 lyx_2.3.6.1-1.dsc
 c6bed2633419898e01a7cc350310d7d934bf591cab7259fc2581aa4c00eafa78 16242608 lyx_2.3.6.1.orig.tar.xz
 6efe3eeab373d0686257d0a0718b9f97bb97993cd57cc78248984b94e940a81c 488 lyx_2.3.6.1.orig.tar.xz.asc
 ed0131f16d2dfad6ab0e975e30efa5ef5196426cc28bc200a981f6926a6ee549 31208 lyx_2.3.6.1-1.debian.tar.xz
 462d44e99d445cc306ac77425aa11c042580181d93dde15694c6210d4ec7c9bb 12237 lyx_2.3.6.1-1_amd64.buildinfo
Files:
 e12179672864ef5f529cafedf7a60abe 2436 editors optional lyx_2.3.6.1-1.dsc
 e8cb8d271dda076fa0671aa7605ba384 16242608 editors optional lyx_2.3.6.1.orig.tar.xz
 6e0f9c6e81c7aa5a35c0b69fb4bb81f0 488 editors optional lyx_2.3.6.1.orig.tar.xz.asc
 c4c0c36ea4eef1274ca112be546d6a88 31208 editors optional lyx_2.3.6.1-1.debian.tar.xz
 57cab070ccd1baaffc90c055080b98bf 12237 editors optional lyx_2.3.6.1-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE0cuPObxd7STF0seMEwLx8Dbr6xkFAmKt9m0ACgkQEwLx8Dbr
6xlc2g/+OEtZJ+IcRALlBv+/E1BTjVVeHkfB6GSMU12GOj+2ZNL12XnLtvqGlXA3
M8v8JG0sh47v/0mqQ1aBx7Fst9H/HmjEQhJ4+XH7Fou2y+SXSN7YKRBK/bHTk11b
Wv5vHIXyUfsufdV9sIMNqKgNbIsJJWVooXRK/GrHnH0Hr0661+bMd6J8B0PRfBMw
XRYcQqoQCVgOGN3/S92jFY8S3sVj+mMI9vdhapu0RQ1kdnWnXbd8Tp8wqv5b8sZv
10X80YB8ejcp9xn+ePBsw7Kwd/eXAdV0Z79gJ17Gv74MlVlfrwoG7bZ+NSU3xYdQ
32nAHu5ZZG5wBJKx/zWy69qn9N9Jy6T59hsGDtxyMUn5tFtA2zsFYc2duUMOtinT
g9ba/hoBpZB1E6d2MkxAXHBOOj0Cl1s9bPfoaeYgYhSp56BCkiZBgxR/cV382b1t
cjEZIZAWlAMzh4Jf4TJ5ufuFbhLsfP+TZKidvj+mLuverzekyYWhhPMFWDvLfzkB
i6OhjNtcg/QKDSLnuDusFXG/UiRybMKNM6Q3+YW7Y5AWk+AY9n4oqaDDb8PNXGtZ
mLAJYfSWqiX/8/PcrB1dwEHIrtaoh/dW6f3FAnBvj6Q1PLmphwh1IrpiEGA+SdiV
33AF+0YKQ46iXDy42qje4G8NegnYRWNEVoWqWTGAvC6EH0i4Rw8=
=zQp9
-----END PGP SIGNATURE-----