Comments (7)
Yah, this is definitely annoying.
I would have actually liked to have different recipes be tab separated in the output of just --summary
, so that recipes in modules could be space separated, i.e., if there's a recipe foo
and a recipe bar
in module baz
, just --summary
would output foo\tbar\sbaz
, so then you could split on tabs to the valid recipes. Unfortunately, this would break any scripts which relied on splitting the output of just --summary
on spaces, or on whitespace, so I opted to use the ::
syntax instead. Eventually, when recipes can have dependencies that are in other modules, I'll probably wind up using the same syntax for dependencies:
mod baz
foo: baz::bar
I'm not opposed to adding foo::bar
as an additional syntax to call recipes in modules from the command line. It seems a bit inelegant to add it just to make the lives of completion scripts easier, but I think some people will prefer that syntax anyhow, and if it becomes the actual syntax for dependencies in other modules, being able to use that syntax on the command line makes sense.
from just.
Another thing that the completion scripts could do is split on ::
, but I have basically never touched the completion scripts personally, and always left them to other brave souls, so I don't know how annoying this would be to do.
from just.
Differentiating between spaces and tabs in completion results sounds messy to me, and like you said, probably backwards-incompatible.
Developers tend to be used to the concept of namespace separators, and ::
is a common one.
In the past I've wanted to use :
to create categories of recipe, e.g. make:migration
but couldn't because :
is not valid in a recipe name. I would use this feature to put all the make recipes in make.just
and reference them as a module, which would tidy things up.
Unfortunately if invoking module recipes by ::
became the only way, the output of just --list
would probably need to change from the neat tabbed output to a flat list with module recipes listed as foo::bar
, otherwise it wouldn't be clear how to invoke them.
Not sure what's best either way, so just sharing my thoughts.
from just.
Unfortunately, this would break any scripts which relied on splitting the output of just --summary on spaces
Not sure if that'd be something worth doing as (at least with bash) it's not the completion script's job to split up the input:
https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-COMP_005fWORDS
It does mention COMP_WORDBREAKS
but imo completions are fragile enough even without trying to change the defaults.
from just.
Unfortunately if invoking module recipes by
::
became the only way, the output ofjust --list
would probably need to change from the neat tabbed output to a flat list with module recipes listed asfoo::bar
, otherwise it wouldn't be clear how to invoke them.
I'd definitely allow both ::
separated and space separated from the command line, since I personally like space-separated, and space is one character, whereas ::
is two characters, and requires shift.
Not sure if that'd be something worth doing as (at least with bash) it's not the completion script's job to split up the input:
Ahh, good catch. So I guess separating by tabs wouldn't work anyway.
from just.
Fixed in #1809, recipes can now be invoked on the command line with path syntax, i.e., foo::bar
.
from just.
Nice. Thanks.
from just.
Related Issues (20)
- failed to select a version for `env_logger` which could resolve this conflict HOT 4
- Run in existing shell OR create interactive child shell HOT 5
- Trouble loading .env file from path HOT 1
- feature request: idempotentcy guards HOT 10
- Allow const expressions in settings
- Bug: Incorrect run just command in just file HOT 2
- [feature request] Installation via pip? HOT 6
- Improvements to cross-platform path environment variable manipulation
- Cannot have a dependencies when using module HOT 2
- Publish checksums of release binaries HOT 2
- Do subsequents of a recipe run "immediately" after the recipe (by specification)? HOT 1
- `completions::bash` test failing under Alpine since 1.28.0 HOT 6
- Fallback for submodules HOT 3
- justfile does not preserver the command exit code HOT 1
- just submodule -l HOT 3
- set working-directory := justfile_directory() HOT 5
- Add variable to have just require a program to be present on the system HOT 1
- Color-code `just` groups HOT 3
- Unknown start of token for simple just HOT 1
- "ignore-comments" does not completely ignore commented lines HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from just.