fix(commands/greenhouse): remove extra space in title, set pipe page title to stdin

pull/240/head
sammyette 2023-10-25 00:00:59 -04:00
parent 8fabdf4502
commit d8a7a4332d
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ commander.register('greenhouse', function(args, sinks)
self.sink:write(ansikit.getCSI(self.region.height + 1 .. ';1', 'H')) self.sink:write(ansikit.getCSI(self.region.height + 1 .. ';1', 'H'))
if not self.isSpecial then if not self.isSpecial then
self.sink:writeln(lunacolors.format(string.format('{grayBg} ↳ Page %d %s{reset}', self.curPage, workingPage.title and '' .. workingPage.title .. ' ' or ''))) self.sink:writeln(lunacolors.format(string.format('{grayBg} ↳ Page %d%s{reset}', self.curPage, workingPage.title and '' .. workingPage.title .. ' ' or '')))
end end
self.sink:write(buffer == '' and display or buffer) self.sink:write(buffer == '' and display or buffer)
end end
@ -98,7 +98,7 @@ commander.register('greenhouse', function(args, sinks)
end) end)
if sinks['in'].pipe then if sinks['in'].pipe then
local page = Page('', sinks['in']:readAll()) local page = Page('stdin', sinks['in']:readAll())
gh:addPage(page) gh:addPage(page)
end end