fish-shell/fish-shell — pull request #1015 by marcecj (2013-09-24 15:09:49+00:00)
Title: Support bzip2 and lzma/xz compressed man pages

This pull request implements support for bzip2 and lzma/xz compressed man pages. Note that the bz2 module is part of the Python standard library (at least for 2.7 and >=3.2), while lzma/xz is only in Python >=3.3 and that Python 2.7 and 3.2 require a backports module. Because of that, it is necessary to import `backports.lzma` or just `lzma` depending on the Python version, for which the simplest solution I could think of is the try/except block employed.

I have tested this on Gentoo Linux using Python 2.7 and 3.2, with both xz and bzip2 compressed man pages, by looking at the resulting generated completions and seeing if they trigger. So far I haven't noticed any issues.

Note that this is my first ever pull request (up to now I'd send patches to bug trackers and mailing lists), so I hope I did everything correctly :) .