Skip to content

gniquil/ex_brace_expansion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExBraceExpansion

Brace expansion, as known from sh/bash, in Elixir. This is a port of brace-expasion javascript project.

Examples

iex> import ExBraceExpansion
nil

iex> expand("file-{a,b,c}.jpg")
["file-a.jpg", "file-b.jpg", "file-c.jpg"]

iex> expand("-v{,,}")
["-v", "-v", "-v"]

iex> expand("file{0..2}.jpg")
["file0.jpg", "file1.jpg", "file2.jpg"]

iex> expand("file-{a..c}.jpg")
["file-a.jpg", "file-b.jpg", "file-c.jpg"]

iex> expand("file{2..0}.jpg")
["file2.jpg", "file1.jpg", "file0.jpg"]

iex> expand("file{0..4..2}.jpg")
["file0.jpg", "file2.jpg", "file4.jpg"]

iex> expand("file-{a..e..2}.jpg")
["file-a.jpg", "file-c.jpg", "file-e.jpg"]

iex> expand("file{00..10..5}.jpg")
["file00.jpg", "file05.jpg", "file10.jpg"]

iex> expand("{{A..C},{a..c}}")
["A", "B", "C", "a", "b", "c"]

iex> expand("ppp{,config,oe{,conf}}")
["ppp", "pppconfig", "pppoe", "pppoeconf"]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages