Cool prompt

* Add `nyagos.access`
* suppress warning of `eval`
* trimming string of `eval`

![](http://go-gyazo.appspot.com/922e1e32dbf91b39.png)

Below is my `~/.nyagos`
```lua
set{
    PROMPT='✔ $e[36;40;1m$P$e[37;1m '
}

local prompt_ = nyagos.prompt
nyagos.prompt = function(prompt)
  local current = nyagos.eval('__pwd__')
  if nyagos.access(current .. '/.svn/entries', 0) then
    local svn_rev = string.match(nyagos.eval('svn info'), 'Revision: (%d+)\n', 1)
    return prompt_('$e[36;40;1m[SVN:' .. svn_rev .. ']$e[0m ' .. prompt)
  elseif nyagos.access(current .. '/.hg/hgrc', 0) then
    local hg_branch = nyagos.eval('hg branch')
    return prompt_('$e[32;40;1m[HG:' .. hg_branch .. ']$e[0m ' .. prompt)
  else
    local git_path = current
    repeat
      if nyagos.access(git_path .. '/.git', 0) then
        local git_branch = string.match(nyagos.eval('git branch'), '* (%S*)', 1)
        if git_branch then
          return prompt_('$e[33;40;1m[GIT:' .. git_branch .. ']$e[0m ' .. prompt)
        end
        break
      end
      git_path = string.match(git_path, '^(.+)\\', 1)
    until not git_path
  end
  return prompt_(prompt)
end
```