Last active
November 13, 2015 11:06
-
-
Save gofer/272db4a02e8c918843ee to your computer and use it in GitHub Desktop.
Tools for Zsh on Cygwin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cygwin環境 | |
if [ `uname -a | grep 'Cygwin' | wc -c` -ne 0 ]; then | |
# Standard ML | |
export SMLNJ_HOME="$(cygpath -u 'C:\Program Files\SMLNJ')" | |
function _sml() | |
{ | |
export CM_PATHCONFIG="$(cygpath -w ${SMLNJ_HOME}/lib/pathconfig)" | |
${SMLNJ_HOME}/bin/.run/run.x86-win32.exe @SMLload="$(cygpath -w ${SMLNJ_HOME}/bin/.heap/sml.x86-win32)" | |
} | |
alias sml=_sml | |
# Notepad++をcygwinから呼び出す | |
export NPPPATH='C:\Program Files\Notepad++\' | |
export NPPEXE="$(cygpath -u "${NPPPATH}\\notepad++.exe")" | |
function _npp() | |
{ | |
# ファイルが存在しないならばエラー | |
#if [ -f $1 ]; then | |
# ${NPPEXE} `cygpath -w $1` | |
#else | |
# echo -e "Noteapd++: \e[31m\e[03mNo such file;\e[0m $1" | |
#fi | |
# ファイルが存在しないならば新規作成 | |
if [ ! -f $1 ]; then | |
touch `cygpath -u $1` | |
fi | |
${NPPEXE} `cygpath -w $1` | |
} | |
alias npp=_npp | |
# ディレクトリをWindows標準のエクスプローラで開く | |
# 引数がなければカレントディレクトリを開く | |
function _dopen() | |
{ | |
_open_path=$(pwd) | |
if [ $# -ge 1 ]; then | |
_open_path=$1 | |
fi | |
explorer $(cygpath -w ${_open_path}) | |
} | |
alias dopen=_dopen | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment