Skip to content

Allow scripts to be hidden from lk #3

@jamescoleuk

Description

@jamescoleuk

Scenario: someone starts using 'lk' and has loads of scripts in sub-dirs. These scripts have relative paths.

Current outcome: these scripts might fail if run via lk from the project root. Worse, they might cause damage.

Option 1: Add nothing and let people figure this out for themselves/re-write their scripts to be location independent (usually possible).

Option 2: Add some mechanism to allow these scripts to be hidden from lk until they're ported/forever.

I do want to add this feature because it's something that bugs me. Here are some ideas:

  1. Add something in the header of these files that lk can detect, e.g.:
#!/usr/bin/env bash
#
# @lk-ignore
  1. Add an .lkignore file. But what if lk is run from a sub-dir? It could search the repo-root, if we're in a repo. Otherwise it's less flexible. But it does centralise the ignores. Still, a grep will find them. Or I could add a sub-command to list hidden scripts.

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