Kota UENISHI avatar Kota UENISHI committed 20a07dd Merge

merge

Comments (0)

Files changed (3)

+let _ = <:expr<[]>>
+
+open Camlp4
+
+module To = struct
+  let name = "pa_to"  (* change *)
+  let version = "0.0.1"  (* change *)
+end
+
+module Make (Syntax : Sig.Camlp4Syntax) = struct
+  open Sig
+  include Syntax
+  open Ast
+
+  (* 文法拡張部 *)
+  let a _loc = <:expr<[]>>;;
+  let b _loc = <:patt<[]>>;;
+(*  let _ = <:ctyp< 'a list >>;;
+  let _ = <:ctyp< ('a, 'b) Hastbl.t>>;;
+  let _ = <:ctyp< int list option>>;;
+*)
+  let f myloc = <:patt@myloc<[], "", wwaasd, asdf>>
+
+end
+
+let module M = Register.OCamlSyntaxExtension(To)(Make) in ()

snippets/dot.zshrc

-
 # Lines configured by zsh-newuser-install
 umask 022
 
 setopt list_packed
 
 export LANG=ja_JP.UTF-8
-export PATH=/opt/local/bin:/opt/local/sbin:$PATH
-export MANPATH=/opt/local/man:$MANPATH
 export EDITOR=emacs
 export OUTPUT_CHARSET=UTF-8
 bindkey -e
 local BLUE=$'%{\e[1;34m%}'
 local DEFAULT=$'%{\e[1;m%}'
 
+autoload -U colors; colors
+
+function rprompt-git-current-branch {
+        local name st color
+
+        if [[ "$PWD" =~ '/\.git(/.*)?$' ]]; then
+                return
+        fi
+        name=$(basename "`git symbolic-ref HEAD 2> /dev/null`")
+        if [[ -z $name ]]; then
+                return
+        fi
+        st=`git status 2> /dev/null`
+        if [[ -n `echo "$st" | grep "^nothing to"` ]]; then
+                color=${fg[green]}
+        elif [[ -n `echo "$st" | grep "^nothing added"` ]]; then
+                color=${fg[yellow]}
+        elif [[ -n `echo "$st" | grep "^# Untracked"` ]]; then
+                color=${fg_bold[red]}
+        else
+                color=${fg[red]}
+        fi
+
+        # %{...%} は囲まれた文字列がエスケープシーケンスであることを明示する
+        # これをしないと右プロンプトの位置がずれる
+        echo "%{$color%}$name%{$reset_color%} "
+}
+
+# プロンプトが表示されるたびにプロンプト文字列を評価、置換する
+setopt prompt_subst
+
+RPROMPT='[`rprompt-git-current-branch`%~]'
+
 export HOSTNAME=`hostname`
-export PROMPT=$BLUE'> %(!.#.$) '$DEFAULT
-export RPROMPT=$GREEN'[${USER}@${HOSTNAME}:%~]'$DEFAULT
+export PROMPT=$BLUE'${USER}@${HOSTNAME}> %(!.#.$) '$DEFAULT
+#export RPROMPT=$GREEN'[${USER}@${HOSTNAME}:%~]'$DEFAULT
 setopt PROMPT_SUBST
 setopt NO_BEEP
 setopt AUTOLIST
 
-OUTPUTZ_KEY=c3hOxeU9q.Se
-OUTPUTZ_API_URL=http://outputz.com/api/post
-
-preexec() {
-#    SIZE=`echo $argv[1] | wc -c | tr -d ' '`
-#    URI=http://www.zsh.org/`echo ${argv[1]} | sed "s/ /_/g"`
-#    POST_DATA="key=${OUTPUTZ_KEY}&uri=${URI}&size=${SIZE}"
-#    CONTENT_TYPE="Content-Type: application/x-www-form-urlencoded"
-#    wget -O - --header "$CONTENT_TYPE" --post-data="$POST_DATA" "$OUTPUTZ_API_URL" >& /dev/null
-}
-
-
 #http://0xcc.net/blog/archives/cat_7.html
 #case "$TERM" in
 #    xterm*|kterm*|rxvt*)
 #    PROMPT='%m:%c%# '
 #    ;;
 #esac
+
+export PATH=$PATH:~/.cabal/bin:/usr/local/depot_tools
+export LD_LIBRARY_PATH=/usr/local/lib
+export CXX='ccache g++'
+export CC='ccache gcc'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.