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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Ops In Folders That Start With . From Output Of opctl ls #1069

Open
squatched opened this issue Jun 9, 2023 · 0 comments
Open

Hide Ops In Folders That Start With . From Output Of opctl ls #1069

squatched opened this issue Jun 9, 2023 · 0 comments

Comments

@squatched
Copy link

squatched commented Jun 9, 2023

馃殌 Feature

In brief, I propose that when an op is created whose folder name starts with . (or which is in a subdir of a folder starting with .), it should be hidden from the output of opctl ls and a new command line switch added (--all/-a) to show any typically hidden ops.

Motivation

For the purposes of organization, I would love to be able to keep all my ops in the canonical .opspec. But I also like to decompose my ops into reusable pieces. To that end, I usually wind up with ops that the end user typically should not be interacting with but there is no way to include them in .opspec without them showing up in opctl ls. So to work around it, I usually have an .opslib sister folder to .opspec and then reference them by ../../.opslib/<my op name>. However, if we take the standard convention of hiding folders and files that start with . and apply that here, I think it would make sense for opctl ls to simply ignore any ops in folders whose names start with . and then there would be an established, known convention that I could leverage to clearly indicate to users that an op isn't designed for end-user use while keeping all my ops in the same location.

Pitch

simply prepending a . to a folder should make the included op (and all ops in subdirs) ignored from opctl ls's folder tree crawl in the default case. A switch should also be added (like --all/-a for ls) to override this behavior and show everything).

In general then, lib ops would not show up in the output to clutter and confuse but they could still be referenced when running opctl ls -a and since that output already simply shows the names of folders, the folder names with . would then show up as an indicator for why they don't show up in the default case (like ls v. ls -a).

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