Skip to content

Instantly share code, notes, and snippets.

@PyYoshi
Created June 13, 2012 10:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PyYoshi/2923267 to your computer and use it in GitHub Desktop.
Save PyYoshi/2923267 to your computer and use it in GitHub Desktop.
日本語でMinttyを扱う時のもろもろの設定ファイル。 nkfを使用すると自動でUTF-8に変換してくれるので便利です。
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
chcp.com 932
alias ls='/bin/ls.exe --show-control-chars --color=auto'
alias less='/bin/less -r'
set meta-flag on
set convert-meta off
set output-meta on
cla()
{
if [ -d "$1" ]; then
cd "$1"
ls -la
fi
}
set meta-flag on
set output-meta on
set convert-meta off
set kanji-code sjis
BoldAsFont=no
Transparency=medium
Font=Takaoゴシック
Locale=ja_JP
Charset=SJIS
set enc=utf8
@PyYoshi
Copy link
Author

PyYoshi commented Jun 14, 2012

当初はlsの出力をnkfに渡す予定だったが、うまくラップできなかったので、各自|nkfするようにした。
git logの場合は
git log|nkf
する必要がある。
また
export GIT_PAGER="nkf -s | less"
してもmintty環境でうまく動かない。これできるなら割かしありなのかもしれない。
逆に
git log --encoding=sjis
も考えたがタイプするのがめんどくさい
それとpushとかcommitするときにも不都合が出てくる。
素直にIDE付属のVCS使えば別にこんな問題ってかんじではある

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment