[Bug 1910114] Re: bash-completion doesn't expand all possible okular filetypes

Martin Weis 1910114 at bugs.launchpad.net
Wed Apr 16 11:39:03 UTC 2025


Additionally okular is a nice Markdown renderer, so this could be added,
too.

However, there are no fixed conventions about the suffix, it seems that
the following ones are recognised by more than one system [0]:

.md
.mkd
.mdwn
.mdown
.mdtxt
.mdtext
.markdown

If I intepret the regex above right, this might catch the above cases (plus any shortened `down` like `dow`): 
.m?(ark)d?(o)?(w)?(n)|.mdt?(e)xt

Maybe uppercase is interesting, too?

BTW, dvi|DVI| is doubled above.

[0] https://superuser.com/questions/249436/file-extension-for-markdown-
files

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/1910114

Title:
  bash-completion doesn't expand all possible okular filetypes

Status in bash-completion package in Ubuntu:
  New

Bug description:
  Since 2019, `okular` has gained the capability to open 7-zip
  compressed comic book archives with the extension of .cb7 | .CB7 .

  `bash-completion` is not keeping track.

  Proposal: Change the okular install_xspec line in `/usr/share/bash-
  completion/bash_completion` to

  _install_xspec
  '!*.@(okular|@(?(e|x)ps|?(E|X)PS|[pf]df|[PF]DF|dvi|DVI|cb[rz7]|CB[RZ7]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|epub|EPUB|odt|ODT|fb?(2)|FB?(2)|mobi|MOBI|g3|G3|chm|CHM)?(.?(gz|GZ|bz2|BZ2|xz|XZ)))'
  okular

  changing essentially from ...cb[rz]|CB[rz]... to ...cb[rz7]|CB[RZ7]...
  .

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1910114/+subscriptions




More information about the foundations-bugs mailing list