Skip to content

implement more special shell-like functionality in backticks #20401

@StefanKarpinski

Description

@StefanKarpinski

Implement the following kinds of constructions in backticks using standard shell syntax:

  • pipeline construction: `grep foo /usr/share/dict/words | wc -l` => pipeline(`grep foo /usr/share/dict/words`, `wc -l`)
  • file redirection: `echo hello > file.txt` => pipeline(`echo hello`, "file.txt"), including append mode with >>, input with <, etc.
  • command generation with { }: `{a,b}.{c,d}` => `a.c a.d b.c b.d`
  • tilde expansion?
  • globbing?

This stuff is all currently possible, but the API for it is a bit hard to remember. This will effectively implement a portable shell-like language inside of backticks, which translates to a Julia implementation backed by libuv. It avoids most of the complexity of shells as languages since it's embedded in a full-fledged programming language (Julia).

Metadata

Metadata

Labels

cmdRelates to calling of external programs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions