using Printf
function hfun_author_date()
return readchomp(`git log -1 --date=short --format=%ad $(locvar(:fd_rpath))`)
end
function hfun_abslink(args)
path = args[1]
return @sprintf("%s", path, pagevar(path, "title"))
end
function hfun_pep(args)
postfix = length(args) < 2 ? "" : '#' * args[2]
return @sprintf(
"PEP %s%s",
Meta.parse(args[1]), postfix, args[1], postfix)
end
function hfun_github(args)
return @sprintf("@%s",
args[1], args[1])
end
function hfun_pip(args)
content = length(args) < 2 ? "GH-" * args[1] : args[2]
return @sprintf("%s",
args[1], content)
end