Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code slightly counter-intuitive #5

Open
actionless opened this issue Nov 7, 2022 · 0 comments
Open

Example code slightly counter-intuitive #5

actionless opened this issue Nov 7, 2022 · 0 comments

Comments

@actionless
Copy link

actionless commented Nov 7, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant