Skip to content

Instantly share code, notes, and snippets.

@routevegetable
Last active June 4, 2020 03:06
Show Gist options
  • Save routevegetable/0751135c6abc3635ca2a9ff9b5f3eb50 to your computer and use it in GitHub Desktop.
Save routevegetable/0751135c6abc3635ca2a9ff9b5f3eb50 to your computer and use it in GitHub Desktop.
get_win_path() {
P=${PWD/\/usr\/lib/\/windows\/system32}
P=${P/\/usr\/bin/\/program files}
P=${P/$HOME/\/Documents and Settings\/$USER}
P=$(echo ${P//\//\\} | tr '[:lower:]' '[:upper:]')
echo "C:$P"
}
export PS1="\$(get_win_path)>"
shcreen() {
ssh -t $1 screen -dR
}
shmux() {
ssh -t $1 tmux a
}
alias :=xargs -n1
bindir() {
which $1 |: readlink -f |: dirname
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment