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

Redesign @goal_glob #34

Closed
xonixx opened this issue Aug 18, 2021 · 0 comments
Closed

Redesign @goal_glob #34

xonixx opened this issue Aug 18, 2021 · 0 comments
Assignees
Milestone

Comments

@xonixx
Copy link
Owner

xonixx commented Aug 18, 2021

See #18

New Design

Let's change the behavior to

@goal goal_name @glob *.txt 
 echo $ITEM $INDEX $TOTAL

Is eqivalent to

@goal [email protected]
 echo a.txt 0 2

@goal [email protected]
 echo b.txt 1 2

iff

$ ls
a.txt b.txt

Also allowed form

@goal @glob *.txt
 echo $ITEM $INDEX $TOTAL

as equivalent for

@goal a.txt
 echo a.txt 0 2

@goal b.txt
 echo b.txt 1 2

Rationale

  1. This will allow have multiple glob goals for same set of files
  2. This will allow multiple globs per goal
    • Discarded: this is big over-complication in terms of UX and implementation.

Discarded design attempt

@goal goal_name
@glob FILE *.txt
 echo $FILE $FILE_INDEX $FILE_TOTAL

Is eqivalent to

@goal goal_name-a.txt
 echo a.txt 0 2

@goal goal_name-b.txt
 echo b.txt 1 2

iff

$ ls
a.txt b.txt
@xonixx xonixx self-assigned this Aug 18, 2021
xonixx added a commit that referenced this issue Aug 23, 2021
xonixx added a commit that referenced this issue Aug 23, 2021
xonixx added a commit that referenced this issue Aug 23, 2021
xonixx added a commit that referenced this issue Aug 23, 2021
xonixx added a commit that referenced this issue Aug 23, 2021
xonixx added a commit that referenced this issue Aug 23, 2021
xonixx added a commit that referenced this issue Aug 23, 2021
xonixx added a commit that referenced this issue Aug 23, 2021
@xonixx xonixx closed this as completed Aug 23, 2021
@xonixx xonixx added this to the 0.9.8 milestone Sep 3, 2021
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