タグ

ブックマーク / anekos.hatenablog.com (2)

  • precmd とかのベターな書き方 - 地獄のネコブログ

    function precmd { hoge } と、書くとシンプルでいいんですが、複数設置はできないので全く別目的のコードであっても、一緒くたにして書く羽目になります。 どのイベントか一つだけならともかく、precmd と preexec 両方にコード入れたいときなどは、分かりづらくなります。 そこで、オレオレ関数を適当に作って、(precmd|preexec|chpwd|periodic|zshaddhistory|zshexit|...)_functions 配列変数にその関数名を突っ込んでやるといいです。 function _OREORE_preexec_1 { echo oreore 1 } function _OREORE_preexec_2 { echo oreore 2 } preexec_functions=($preexec_functions _OREORE_pree

    precmd とかのベターな書き方 - 地獄のネコブログ
    raimon49
    raimon49 2013/01/09
    (precmd|preexec|chpwd|periodic|zshaddhistory|zshexit|...)_functions 配列変数にオレオレ関数を並べる。
  • git on cygwin - 地獄のネコブログ

    cygwin 1.7.1 で UTF-8 対応記念的な、cygwin と git 辺りのメモ。 cygwin 環境変数を CYGWIN="binmode tty" (tty は gitk で問題がでるとかでないとか?) git ~/.gitconfig core の辺りは面倒ごとになりやすいので重要 [user] name = anekos email = anekos@snca.net [color] status = auto diff = auto [alias] co = checkout ci = commit -v st = status br = branch me = merge di = diff dife = diff master origin/master up = log pull = pull --rebase [core] autocrlf = false #

    git on cygwin - 地獄のネコブログ
    raimon49
    raimon49 2010/04/13
    cygwinでgit使うときの ~/.gitconfig
  • 1