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

fix(autocomplete): filepath completions #968

Merged
merged 1 commit into from
Aug 2, 2018
Merged

fix(autocomplete): filepath completions #968

merged 1 commit into from
Aug 2, 2018

Conversation

RasPhilCo
Copy link
Contributor

@RasPhilCo RasPhilCo commented Jul 31, 2018

fixes #962

@RasPhilCo RasPhilCo requested a review from a team July 31, 2018 18:55
Copy link
Contributor

@jmonster jmonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏄‍♂️

@RasPhilCo RasPhilCo merged commit b681eb5 into master Aug 2, 2018
@RasPhilCo RasPhilCo deleted the ac-files branch August 2, 2018 18:03
@stof
Copy link
Contributor

stof commented Aug 21, 2018

this does not seem to work for me using 7.9.3. Is there anything to do to make it work ?

@stof
Copy link
Contributor

stof commented Aug 21, 2018

note that cat ~/.cache/heroku/autocomplete/commands_setters |grep -C 5 -- '--file' shows me this (even after re-running heroku autocomplete:create):

}

_set_pg_psql_flags () {
_flags=(
"--command=-[SQL command to run]"
"--file=-[SQL file to run]"
"--credential=-[credential to use]"
"--app=-[(autocomplete) app to run command against]: :_compadd_flag_options"
"--remote=-[(autocomplete) git remote of app to use]: :_compadd_flag_options"
)
}
--
}

_set_psql_flags () {
_flags=(
"--command=-[SQL command to run]"
"--file=-[SQL file to run]"
"--credential=-[credential to use]"
"--app=-[(autocomplete) app to run command against]: :_compadd_flag_options"
"--remote=-[(autocomplete) git remote of app to use]: :_compadd_flag_options"
)
}

So it looks like the if (this.wantsLocalFiles(flag)) { cachecompl = ': :_files' } code does not work

@RasPhilCo
Copy link
Contributor Author

Confirmed v7.9.4 is working, update and you should be all set! Thanks again for logging the issue.

@stof
Copy link
Contributor

stof commented Aug 22, 2018

I confirm that this works fine with heroku pg:psql --file=..., but it does not work for heroku pg:psql -f .... Is there any way to make it work ?

@RasPhilCo
Copy link
Contributor Author

Autocomplete triggers on long flags. I'm thinking of how we could "inactivate" autocomplete for short flags that would not be too destructive.

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

Successfully merging this pull request may close these issues.

autocomplete breaks the completion for files for pg:psql -f
3 participants