Skip to content

Instantly share code, notes, and snippets.

@vascoosx
Last active February 1, 2017 11:41
Show Gist options
  • Save vascoosx/8049c034faaa236bddb8944eaf7535b1 to your computer and use it in GitHub Desktop.
Save vascoosx/8049c034faaa236bddb8944eaf7535b1 to your computer and use it in GitHub Desktop.
emacs bindings, for unix users
Set-PSReadlineOption -EditMode Emacs
sal -Name ls -Value C:\cygwin64\bin\ls.exe -Option AllScope
Set-PSReadLineOption -TokenKind Parameter -ForegroundColor Gray -BackgroundColor 0
Set-Alias find "C:\cygwin64\bin\find.exe"
[Environment]::SetEnvironmentVariable("SSH_AUTH_SOCK", '/tmp/.ssh-pageant-sh.otsuka', "Process")
$agentPid=ssh-pageant -r -a '/tmp/.ssh-pageant-sh.otsuka' | grep "PID"
if( -not $?) {
$agentPid=$agentPid -replace '[A-Z,_,=,a-z,;]',''
[Environment]::SetEnvironmentVariable("SSH_PAGEANT_PID", $agentPid, "Process")
}
Function showHosts { Get-Content "C:\cygwin64\home\sh.otsuka\.ssh\config"}
set-Alias hosts showHosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment