This file contains hidden or 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
| declare -x SSH_ENV="$HOME/.ssh/environment" | |
| # start the ssh-agent | |
| function start_agent { | |
| echo "Initializing new SSH agent..." | |
| # spawn ssh-agent | |
| ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" | |
| echo succeeded | |
| chmod 600 "$SSH_ENV" | |
| . "$SSH_ENV" > /dev/null |
This file contains hidden or 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 git_checkout_match_generator(text, first, last) | |
| found_matches = false; | |
| if rl_state.line_buffer:find("^git checkout ") then | |
| has_start_branch = not rl_state.line_buffer:find("^git checkout[ ]*$") | |
| for line in io.popen("git branch 2>nul"):lines() do | |
| local m = line:match("[%* ] (.+)$") | |
| if m then | |
| if not has_start_branch then | |
| clink.add_match(m) |
This file contains hidden or 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
| @ECHO OFF | |
| REM Set default sock file | |
| SET SSH_AUTH_SOCK=/tmp/ssh-agent.sock | |
| REM Check socket is available | |
| IF NOT EXIST "%TMP%\ssh-agent.sock" GOTO:RUNAGENT | |
| REM Check if an ssh-agent is running | |
| FOR /f "tokens=*" %%I IN ('ps ^| grep ssh-agent ^| sed "s/^ *\([0-9]\+\) .*/\1/"') DO SET VAR=%%I |