Last active
July 17, 2019 02:07
-
-
Save richard24se/f5bf70ad45be6f2959852faf426d7360 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dogrant{ | |
$actualPath = Get-Location | select Path -ExpandProperty Path | |
#EDIT THIS PATH | |
$remotePath = "apps/" | |
#USE TYPE DIRECTORY LIKE THIS :---> c:\apps\backend\users or c:\apps\frotend\sync | |
$parent = (get-item $(Get-Location)).parent | select Name -ExpandProperty Name | |
$current = Split-Path -leaf -path (Get-Location) | |
$targetPath = $remotePath+""+$parent+"/"+$current | |
#EDIT DIRECTORY OF VAGRANT | |
cd C:\vagrant | |
$command = "cd "+$targetPath+"; /bin/bash" | |
vagrant ssh -c $command | |
Write-Host "saliste! Regresas a tu anterior Path..." | |
cd $actualPath | |
} | |
function vacker([string]$option){ | |
$actualPath = Get-Location | select Path -ExpandProperty Path | |
cd C:\vagrant | |
vagrant $option | |
Write-Host "saliste! Regresas a tu anterior Path..." | |
cd $actualPath | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment