Skip to content

Instantly share code, notes, and snippets.

@sgur sgur/.inputrc
Last active Apr 9, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.