Skip to content

Instantly share code, notes, and snippets.

@sgur
Last active April 9, 2018 05:23
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 sgur/8c3c1e076c42bccae88c6e2f018abdd7 to your computer and use it in GitHub Desktop.
Save sgur/8c3c1e076c42bccae88c6e2f018abdd7 to your computer and use it in GitHub Desktop.
Bash on Windows (Trusty) 上で必要な設定ファイル類
# A ~/.inputrc for Humans
# https://www.topbug.net/blog/2017/07/31/inputrc-for-humans/
$include /etc/inputrc
"\C-p":history-search-backward
"\C-n":history-search-forward
set colored-stats On
set completion-ignore-case On
set completion-prefix-display-length 3
set mark-symlinked-directories On
set show-all-if-ambiguous On
set show-all-if-unmodified On
set visible-stats On

注意点

ppa 等のレポジトリ追加時の注意

  • apt-add-repository は apt.conf の情報 (Acquire::http::proxy 等) を見てくれない
  • $http_proxy, $https_proxy は有効なため、これらを .bashrc 等で設定し、sudo したときにも引き継げるよう、sudoers で設定しておく必要がある
ln -s ~/src/github.com/seebi/dircolors-solarized/dircolors.256dark ~/.dircolors
# CNTLM 前提
Acquire::http::proxy "http://127.0.0.1:3128";
Acquire::https::proxy "http://127.0.0.1:3128";
Acquire::https::dl.yarnpkg.com::CaInfo "/Path/to/cert";
Acquire::https::deb.nodesource.com::CaInfo "/Path/to/cert";
# WSL
alias ls 'command ls --color=auto --classify --human-readable --ignore="hiberfil.sys" --ignore="pagefile.sys" --ignore="swapf
→ ile.sys" --hide="bootmgr" --hide="BOOTNXT" --ignore="\$Recycle.Bin" --ignore="NTUSER.DAT*" --ignore="ntuser.*" --hide="\$
→ tf"'
alias mv 'command mv --interactive'
alias cp 'command cp --interactive'
alias rm 'command rm --interactive=once'
set -gx PATH /bin ./node_modules/.bin /usr/lib/go-1.8/bin ~/bin $PATH
if test -z $LS_COLORS ;and test -f ~/.dircolors
echo "setting LS_COLORS"
eval (string replace 'setenv' 'set -Ux' (dircolors -c ~/.dircolors))
end
# Pandoc on WSL
# * http://emasaka.blog65.fc2.com/blog-entry-1338.html
# * https://github.com/Microsoft/BashOnWindows/issues/307#issuecomment-239617836
set -gx GHCRTS -V0
# Fish git prompt
set __fish_git_prompt_showdirtystate 'yes'
function echo_pwd --on-variable PWD
echo "Now at $PWD"
end
Defaults env_keep="http_proxy"
Defaults env_keep+="https_proxy"
Defaults env_keep+="PIP_CERT"
Defaults env_keep+="EDITOR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment