You are not logged in.

#1 2016-04-18 18:28:29

AlphaFoxAlpha
Member
Registered: 2016-04-18
Posts: 2

[Solved] Awesome3.5:Weird behavior when concatenating awful.util.pread

Hi!

I have a problem using awful.util.pread together with the concatenation symbol '..'
Here is a quick example:

testbox = wibox.widget.textbox()
local testvar = awful.util.pread('echo "1234"')
testbox:set_markup("pre " .. testvar .. " post")

This code outputs only

pre 1234

but in my opinion it should display

pre 1234 post

What am I doing wrong? Or is it a bug?

Last edited by AlphaFoxAlpha (2016-04-19 09:43:47)

Offline

#2 2016-04-19 09:43:06

AlphaFoxAlpha
Member
Registered: 2016-04-18
Posts: 2

Re: [Solved] Awesome3.5:Weird behavior when concatenating awful.util.pread

I have opened an issue at the awesome github and got an very useful hint: the newline after the pread output is the problem, with 'echo -n'  everthing works perfectly.

Offline

Board footer

Powered by FluxBB