_nyaの構成

set HOME=C:\Users\about
set PATH=%PATH%;C:\MinGW\msys\1.0\bin
set PATH+=C:\MinGW\pdcurses\bin
set PATH+=C:\MinGW\termcap\bin
set PATH+=C:\MinGW\bin
set PATH+=C:\"Program Files (x86)"\weather_cmd
set PATH+=C:\Program Files (x86)\emacs\bin
set PATH+=C:\xampp\php
set PATH+=C:\ckw\appcat
set PATH+=C:\"Program Files (x86)"\TweetConsole
set PATH+=C:\boost_1_49_0\stage\lib
set PATH+=C:\Program Files (x86)\gnu-source-highlight
set PATH+=C:\Windows\Microsoft.NET\Framework\v4.0.30319

set C_INCLUDE_PATH=C:\MinGW\include
set C_INCLUDE_PATH+=C:\MinGW\pdcurses\include
set C_INCLUDE_PATH+=C:\MinGW\termcap\include
set C_INCLUDE_PATH+=C:\boost_1_49_0\stage\lib

set LIBLARY_PATH=C:\MinGW\pdcurses\lib
set LIBLARY_PATH+=C:\MinGW\termcap\lib
set LIBLARY_PATH+=C:\MinGW\lib
set LIBLARY_PATH+=C:\MinGW\include\boost\lib

alias dir\w %COMSPEC% /c dir /w
alias start cmd /c start
alias kill taskkill /pid
alias down C:\windows\system32\shutdown.exe /s /t 1
alias re C:\windows\system32\shutdown.exe /r /t 1
alias cp C:\Windows\system32\cmd.exe /c copy
alias mv C:\Windows\system32\cmd.exe /c move
alias login ssh s1190173@sshgate.u-aizu.ac.jp
alias free C:\Windows\system32\empty.bat
alias find C:\Windows\system32\cmd.exe /c dir /s /d
alias findstr find
alias sa sakura
alias topcoder cd \topcoder\testcode
alias aoj cd ~/programing/c++/AOJ
alias read C:\"Program Files (x86)"\Adobe\"Reader 10.0"\Reader\AcroRd32.exe
alias date C:\Users\about\programing\c++\project\time\a.exe
alias clear cmd.exe /c cls
alias test C:\Users\about\programing\c++\project\stat\a.exe

if /%OS%/ == /Windows_NT/ then
alias kill taskkill /pid
alias kill9 taskkill /f /pid
alias ps tasklist
suffix vbs cscript //nologo
suffix js cscript //nologo
endif

suffix ny nyaos -f
suffix pl perl
suffix py python
suffix rb ruby
suffix jar java -jar
suffix lua lua
suffix awk awk -f

option +backquote
option +history
option +nullcomplete
option +tilde
option +glob
# option prompt $e[31;40;1mabout_hiroppy:[$w]$_input = $e[37;1m
option prompt $e[36;40;1m$p$_input $e[37;1m
option uncompletechar ,;=``

foreach i (mkdir rmdir type md rd start mklink)
alias $i $COMSPEC /c $i
end

foreach cmd (dir copy move del rename ren del attrib)
$cmd{
if %glob.defined% -ne 0 then
option -glob
$COMSPEC /c $0 $*
option +glob
else
$COMSPEC /c $0 $*
endif
}
end

bindkey CTRL_P vzlike-previous-history
bindkey CTRL_N vzlike-next-history

### Vzライクなキーバインドにする関数
### 利用時には「vzbind」とだけの行を入れてください。
vzbind{
bindkey CTRL_R xscript:start xscript:pageup
bindkey CTRL_S backward xscript:backward
bindkey CTRL_D forward xscript:forward
bindkey CTRL_E vzlike-previous-history xscript:previous
bindkey CTRL_X vzlike-next-history xscript:next
bindkey CTRL_F forward-word
bindkey CTRL_A backward-word
}
# vzbind

lua_e "
--- NYAOS 終了時のフック ---
function nyaos.goodbye.message()
print('Good bye !!')
end

-- キーフックサンプル --
-- (「nyaos.keyhook = sample_keyhook」で利用可能)
function sample_keyhook(t)
if t.key == nyaos.key.F1 and t.text == '' then
return os.getenv('EDITOR') or 'notepad',true
end
return nil
end

-- コマンドラインフィルターサンプル:「$lua(…)」(括弧内はLua式) --
-- (「nyaos.filter.sample = sample_filter」で利用可能になる)
function sample_filter(cmdline)
return cmdline:gsub('$lua(%b())',function(m)
local status,result=pcall( loadstring('return '..m) )
if status then
return result
else
print('Ignore invalid Lua expression: '..m)
return false;
end
end)
end

--- which コマンド ---
function nyaos.command.which(cmd)
local path='.;' .. os.getenv('PATH')

--- 引数が無い場合は、PATH の一覧を表示するだけ ---
if not cmd or cmd:len()==0 then
for path1 in path:gmatch('[^;]+') do
print(path1)
end
return
end

local cmdl=cmd:lower()

--- エイリアスを検索 ---
local a=nyaos.alias[ cmdl ]
if a then
print('aliased as '..a)
end
--- 関数を検索 ---
local f=nyaos.functions[ cmdl ]
if f then
print('defined as function')
end

local variation={
[ cmdl ] = true ,
[ cmdl .. '.exe' ] = true ,
[ cmdl .. '.cmd' ] = true ,
[ cmdl .. '.bat' ] = true ,
[ cmdl .. '.com' ] = true
}
for key,val in pairs(nyaos.suffix) do
variation[ cmdl .. '.' .. key:lower() ] = true
end

for path1 in path:gmatch('[^;]+') do
for fname in nyaos.dir(path1) do
if variation[ fname:lower() ] then
print( path1 .. '\\' .. fname )
end
end
end
end

-- 「-t」オプション付きで起動された時:
for i,e in pairs(nyaos.argv) do
if e == '-t' then
-- ls にカラーオプションを付ける --
nyaos.alias.ls = (nyaos.alias.ls or 'ls')..' --color -x'

if os.getenv('VIMSHELL') == '1' then
nyaos.option.ls_colors='fi=37:di=32:sy=31:ro=34:hi=33:ex=35:ec=0'
nyaos.option.prompt='$e[31m[$w]$_$$ $e[37m'
nyaos.option.term_clear = ''
nyaos.option.term_cursor_on = ''

function nyaos.command.complete_test(arg)
local list=nyaos.default_complete(arg,1)
for i=1,#list do
print(list[i][2])
end
end
else
nyaos.option.ls_colors='fi=30:di=32:sy=31:ro=34:hi=33:ex=35:ec=0'
nyaos.option.prompt='$e[31m[$w]$_$$ $e[30m'
end
end
end

function nyaos.command.cmdsource(...)
local arg={...}
if #arg < 1 then
print('usage: cmdsource BATCHFILENAME ARG...')
print('')
print(' the command which execute the batch-file')
print(' and load environment-variables defined on it.')
return
end
local tmpfile = os.tmpname()
tmpfile = table.concat({string.byte(tmpfile,1,tmpfile:len())})
for i=1,#arg do
if string.match(arg[i],' ') then
arg[i] = '\034'..arg[i]..'\034'
end
end

os.execute(table.concat(arg,' ')..' & set > '..tmpfile)

for line in io.lines( tmpfile ) do
local left,right = string.match(line,'([^=]+)=(.*)$')
if os.getenv(left) ~= right then
print('SET '..left..'='..right)
nyaos.exec('SET '..left..'='..right)
end
end

os.remove(tmpfile)
end
"

windows7 64bit で起動中
Link -> http://www.nyaos.org/