noobie icon indicating copy to clipboard operation
noobie copied to clipboard

Example code slightly counter-intuitive

Open actionless opened this issue 3 years ago • 0 comments

instead of

local noobie_exmaple_1 = require("noobie")
local noobie_exmaple_2 = require("noobie")

noobie_exmaple_1{ path = os.getenv("HOME") .. '/.config/awesome/noobie/test.sh' }
noobie_exmaple_2{ path = os.getenv("HOME") .. '/.config/awesome/noobie/othertest.py' }

i suggest to write it like:

local noobie = require("noobie")

noobie_exmaple_1 = noobie{ path = os.getenv("HOME") .. '/.config/awesome/noobie/test.sh' }
noobie_exmaple_2 = noobie{ path = os.getenv("HOME") .. '/.config/awesome/noobie/othertest.py' }

--or just 
--noobie{ path = os.getenv("HOME") .. '/.config/awesome/noobie/test.sh' },

the existing example implying that noobie_exmaple_1 and noobie_exmaple_2 are different entities which is not the case

actionless avatar Nov 07 '22 06:11 actionless