-
Notifications
You must be signed in to change notification settings - Fork 34
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
use _default
instead of nothing as dest in complete_zsh
#65
Comments
_default
instead of `` as dest in complete_zsh_default
instead of nothing as dest in complete_zsh
Hi @tshu-w - not sure I follow but would be happy to accept a PR :) |
Hi, let me explain my thought further. As mentioned in omni-us/jsonargparse#108 (comment), I use
I would like to use "({})".format(" ".join(map(str, opt.choices)))) if opt.choices else "", to "({})".format(" ".join(map(str, opt.choices)))) if opt.choices else "_default", This would be incompatible and may not be what everyone expects, so for a formal PR, I think it would be a good idea to set a variable for the user to modify like: DEFAULT_FUNCTIONS = {
"bash": "_shtab_compgen_files",
"zsh": "_default",
"tcsh": ""
} and "({})".format(" ".join(map(str, opt.choices)))) if opt.choices else f"{DEFAULT_FUNCTIONS['zsh']}", |
Hi sorry for the long delay. Makes sense; interface could be |
@casperdcl Yes, I'm looking forward to this enhancement. |
actually... is this incompatible with #46? |
Not really. What I want is a better default completion target in shell, #46 is to autofill the What #46 wants is to look like:
|
Does #83 work for you? |
Hi, it will be much better if we use
_default
instead of nothing as dest incomplete_zsh
https://github.com/iterative/shtab/blob/master/shtab/__init__.py#L476 and https://github.com/iterative/shtab/blob/master/shtab/__init__.py#L486. User can get basic default competition without setting.The text was updated successfully, but these errors were encountered: