Skip to content

add syntax for using existing snippet as input #57

@katexochen

Description

@katexochen

As far as I understand mdsh, it is currently used to (re-)generate markdown snippets. It would be nice if a command could update an existing snippet, so we don't have to generate the entire thing in code but rather modify the tiny bit we are interested in.

This could be implemented by injecting the target block as stdin:

& sed -e 's/foo/bar/'

loooooooooooooooooooooooong snippet foo

Run mdsh. foo is fed as stdin to sed. Result:

& sed -e 's/foo/bar/'

loooooooooooooooooooooooong snippet bar

This could for example be used to update things like versions in more complex markdown blocks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions