Skip to content

Get the hostname automatically with vagrant ssh-config#4495

Merged
danielbachhuber merged 1 commit intomasterfrom
find-vagrant-host
Nov 7, 2017
Merged

Get the hostname automatically with vagrant ssh-config#4495
danielbachhuber merged 1 commit intomasterfrom
find-vagrant-host

Conversation

@miya0001
Copy link
Member

@miya0001 miya0001 commented Nov 7, 2017

When we use the ssh with scheme vagrant, it can get the hostname automatically like following.

$ wp theme list --ssh=vagrant:/var/www/html
+-----------------+----------+--------+---------+
| name            | status   | update | version |
+-----------------+----------+--------+---------+
| twentyeleven    | inactive | none   | 2.7     |
| twentyfifteen   | inactive | none   | 1.9     |
| twentyfourteen  | inactive | none   | 2.1     |
| twentyseventeen | active   | none   | 1.4     |
| twentysixteen   | inactive | none   | 1.4     |
| twentyten       | inactive | none   | 2.4     |
| twentythirteen  | inactive | none   | 2.3     |
| twentytwelve    | inactive | none   | 2.4     |
+-----------------+----------+--------+---------+
Connection to 127.0.0.1 closed.

@miya0001
Copy link
Member Author

miya0001 commented Nov 7, 2017

If there is a ~/.wp-cli/config.yml in the vagrant machine and it has path: /var/www/html, we can connect --ssh=vagrant only.

@danielbachhuber danielbachhuber merged commit 1f82b3f into master Nov 7, 2017
@danielbachhuber danielbachhuber deleted the find-vagrant-host branch November 7, 2017 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants