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

Exclamation mark (!) in password causes command to break #1

Closed
kristijanhusak opened this Issue Mar 8, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@kristijanhusak

kristijanhusak commented Mar 8, 2018

DB command fails when using this database url:

postgres://postgres:SuperSecure1!@192.168.99.100:5432/my-database

I get this error in preview window:

psql: invalid port number: "SuperSecure1mkdir ~"

Removing ! from password fixes it.

@tpope

This comment has been minimized.

Owner

tpope commented Mar 8, 2018

Will fix. You might consider using ~/.pgpass to avoid the whole password on the command line problem.

@tpope tpope closed this in 2b303d6 Mar 8, 2018

@hoylemd

This comment has been minimized.

hoylemd commented Oct 29, 2018

Did this get fixed?

@tpope

This comment has been minimized.

Owner

tpope commented Oct 31, 2018

Yes.

@hoylemd

This comment has been minimized.

hoylemd commented Nov 1, 2018

Hmm. I was still seeing this behaviour on Monday. I installed the plugin via Vundle a week ago. I was specifying the db conection string in a project-local vimrc like:

DB g:db = postgres://<username>@<hostname>:<password!>@<full_server_domain>/<db_name>

full error message:
psql: invalid port number: '<password!>@<full_server_domain>'

It might be the @ username format though, not the ! in the password. (my server is set up to require the hostname on the username and I don't have any control over that)

@tpope

This comment has been minimized.

Owner

tpope commented Nov 3, 2018

Definitely the @ in the username. URLs require you to escape it as %40.

@hoylemd

This comment has been minimized.

hoylemd commented Nov 5, 2018

Oooooh! wow, I can't believe I didn't think of that. Thanks! @tpope, Always making vim better :D

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