Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man pages and shell autocomplete support #150

Closed
arisboch opened this issue Jan 7, 2019 · 8 comments
Closed

man pages and shell autocomplete support #150

arisboch opened this issue Jan 7, 2019 · 8 comments

Comments

@arisboch
Copy link

arisboch commented Jan 7, 2019

Is it possible to have the install script install man pages and support for the autocomplete functions of shells (e.g. of bash, fish, zsh and so on) on a Linux system?

@mikf
Copy link
Owner

mikf commented Jan 7, 2019

Apparently It is possible (youtube-dl does so in its setup.py),
but there are currently neither man pages nor autocomplete files for this project.

@arisboch
Copy link
Author

arisboch commented Jan 7, 2019

Apparently It is possible (youtube-dl does so in its setup.py),
but there are currently neither man pages nor autocomplete files for this project.

Well, it is a request for a feature not yet there.

@mikf mikf assigned mikf and unassigned mikf Feb 6, 2019
mikf added a commit that referenced this issue Mar 28, 2019
… a man-page containing all of gallery-dl's configuration file options.

This implementation relies on Python dicts preserving their insertion
order. Python 3.4 and 3.5 need to use OrderedDict or they produce
randomly ordered man-page sections.

The man-page formatting is a bit rough around the edges, but it works
for the most part. The only real "problem" are inline-links, but it's
better if they are left in there.
@mikf
Copy link
Owner

mikf commented Mar 29, 2019

v1.8.1 comes with a bash completion script and two man pages (one general, one for config file options). They all could most certainly be improved, but at least it's something.

zsh completion works with a simple compdef _gnu_generic gallery-dl, so I didn't bother with an explicit completion script for it.

@mikf mikf closed this as completed Mar 29, 2019
@kattjevfel
Copy link
Contributor

Gonna try my luck here and ask if we can't get zsh completion included, with the current solution I have source the completion file in my .zshrc directly and it's just all around an ugly workaround. Understandable if you don't wanna bother with it :p

mikf added a commit that referenced this issue Jul 4, 2020
@mikf
Copy link
Owner

mikf commented Jul 4, 2020

@kattjevfel I hope this works: d0cd86e
(it did when I tested this locally, but you never know ...)

@kattjevfel
Copy link
Contributor

kattjevfel commented Jul 4, 2020

scrapped message
nvm I was a dum dum and oh-my-zsh was acting up, works fine after deleting .zcoredump! Thanks!

EDIT 2: okay I got it to work once and never again..

katt@main ~ » gallery-dl
file:      ftp://     gopher://  http://    https://

@mikf
Copy link
Owner

mikf commented Jul 4, 2020

Try putting a dash or double dash after gallery-dl and then pressing TAB:

$ gallery-dl
file:      ftp://     gopher://  http://    https://

$ gallery-dl --
--abort                 -- Abort extractor run after N consecutive file down
--chapter-filter        -- Like "--filter", but applies to manga-chapters an
--chapter-range         -- Like "--range", but applies to manga-chapters and
--clear-cache           -- Delete all cached login sessions, cookies, etc.
...

If you don't provide any input after gallery-dl, it expects an URL and tries to complete the start with file: ftp:// gopher:// http:// https://

@kattjevfel
Copy link
Contributor

Oh, right. Yes that works. I kinda just went with how the bash completion worked (or maybe misbehaved?).

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants