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

scandir: Provide a method to modify each item of table returned #201

Open
Akianonymus opened this issue Jul 31, 2021 · 3 comments
Open

scandir: Provide a method to modify each item of table returned #201

Akianonymus opened this issue Jul 31, 2021 · 3 comments

Comments

@Akianonymus
Copy link

Something like on_insert but to modify the strings that are inserted in the output table.

Yes, we could always just another ipairs loop and do that, but more convenient this way.

@matu3ba
Copy link
Contributor

matu3ba commented Oct 3, 2021

This can be used with iterators.lua ie with

iter.iter(repo_paths)
    :map(function(repo_path) return _utils.get_project_from_path(repo_path) end)
    :tolist()

Suggestion to close.

@Conni2461
Copy link
Collaborator

We could add a option to disable the capturing. aka adding it to a table. So you only create on table, the one in on_insert

@Conni2461
Copy link
Collaborator

We have something similar for plenary.job.

-- enable_recording: Do you want to record stdout/stderr into a table.
-- Since it cannot be enabled when enable_handlers is false,
-- we try and make sure they are associated correctly.
obj.enable_recording = F.if_nil(
F.if_nil(o.enable_recording, o.enable_handlers, o.enable_recording),
true,
o.enable_recording
)

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

3 participants