You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
馃殌 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 ofopctl 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 inopctl 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 foropctl 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 fromopctl ls
's folder tree crawl in the default case. A switch should also be added (like--all
/-a
forls
) 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 (likels
v.ls -a
).The text was updated successfully, but these errors were encountered: