-
Notifications
You must be signed in to change notification settings - Fork 414
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
Autocompletion for positional parameters on ~
#2068
Comments
~
~
So, as mentioned above, auto-completion for
For positional parameters, the same
Adding the
However, given that this statement is part of the generic function footer, adding the |
One idea is to replace the generic footer function with one that has the |
@remkop Thanks for the suggestion. Just to confirm, the reason that the if-block handling file completions falls through to the footer, instead of returning immediately if there are any file matches, is to allow multiple completion options to be combined, correct? For example, for a positional file parameter with arity 0..*, we may need to combine file completion options with Instead of replacing the generic footer function, I think the following might be easier as it better fits into current architecture:
I'll look at having a PR created for this. |
We're trying to have our application properly handle paths starting with
~
to represent the user home directory. It seems likebash
is already taking care of expanding~
references with the proper path when invoking our application. The work-around mentioned in #437 (comment) only seems to be necessary when running our application from the IDE and probably when running from shells that don't natively support~
.However, in all of the situations listed above, it seems like the auto-completion script doesn't support paths starting with
~
for positional parameters; for options auto-completion seems to work fine. The auto-complete debug output looks completely similar when trying to autocomplete either~/test-autocomplete/
or/home/rsenden/test-autocomplete/
, apart from the function returning 1 for the path with~
instead of 0 when using the absolute path; see below.I don't have sufficient experience with auto-completion scripts to understand exactly what's causing this difference, and what would need to be done to properly support paths starting with
~
. Any idea?Sample autocomplete function:
Output with
/home/rsenden/test-autocomplete/
as input:Output with
~/test-autocomplete/
as input:The text was updated successfully, but these errors were encountered: