Skip to content

Instantly share code, notes, and snippets.

@yoggy
Created November 19, 2019 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoggy/e18fe33c41fa591601ac73d13d892441 to your computer and use it in GitHub Desktop.
Save yoggy/e18fe33c41fa591601ac73d13d892441 to your computer and use it in GitHub Desktop.
$ cat >> ~/.bashrc
if [ "${OS}" = "Windows_NT" ]; then
function wincmd(){
CMD=$1
shift
$CMD $* 2>&1 | iconv -f cp932 -t utf-8
}
alias ipconfig='wincmd ipconfig'
alias nslookup='wincmd nslookup'
alias netstat='wincmd netstat'
alias net='wincmd net'
alias netsh='wincmd netsh'
alias taskkill='wincmd taskkill'
alias ping="wincmd ping.exe"
fi
function share_history {
history -a
history -c
history -r
}
PROMPT_COMMAND='share_history'
shopt -u histappend
export HISTSIZE=9999
alias vi=vim
alias ls='ls -F --color'
alias lv='less'
export PATH=$PATH:~/bin/
eval $(/usr/bin/ssh-pageant -r -a "/tmp/.ssh-pageant-$USERNAME")
^D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment