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
-- 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 |
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
# -*- coding: utf-8 -*- | |
# earthquake.gem plugin | |
# add url to Pocket(http://getpocket.com) | |
require 'uri' | |
require 'open-uri' | |
Earthquake.init do | |
cfg = config[:pocket] || {} | |
command :pocket do |m| | |
pocket_uri = URI.parse('https://readitlaterlist.com/v2/add') |