portable versionでも良いが、インストールしていないと、縦に選択等のAltキーを使用するショートカットが使えなかった。
This file contains 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
-- svnの作業dirでurlを、そしてgitの作業dirでbranch名をプロンプトに出力 | |
function nyaos.prompt(prompt) | |
local current = nyaos.eval('__pwd__') | |
if nyaos.access(current .. '/.svn/entries', 0) then | |
local svn_url = string.match(nyaos.eval('svn info --xml'), '<url>(.*)</url>', 1) | |
return true, '$e[36;40;1mSVN[' .. svn_url .. ']' .. prompt | |
else | |
local git_path = current | |
repeat | |
if nyaos.access(git_path .. '/.git', 0) then |