Infinidat / infi.docopt_completion

BSD 3-Clause "New" or "Revised" License
109 stars 9 forks source link

file completion not working after redirection #13

Closed kindlychung closed 8 years ago

kindlychung commented 8 years ago

Here is the help message:

clipr --help
clipr

Usage:
  clipr input
  clipr output
  clipr version
  clipr --help

Options:
  --help    Print this message.

Subcommands:
  input:        Put content from stdin into clipboard.
  output:       Put content from clipboard into stdin.
  version:      Print version.

If I type clipr output > /home/k then tab, there is no suggestion at all.

wiggin15 commented 8 years ago

Hi. It's unlikely that the problem you have is related to docopt-completion. The shell itself should recognize the redirection character (">") and then use its own file completion routines for the path you start typing. I tried it now to make sure, and I have no problem completing file paths after using docopt completion and redirection. Are you using bash or zsh?

kindlychung commented 8 years ago
bash --version
GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin14.5.0)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
wiggin15 commented 8 years ago

I found the problem and committed a fix. Thanks for reporting this. I uploaded version 0.2.6.post3 to PyPI, please try it and let me know if your issue (and issue #12) are resolved