yaa110/nomino

More nests and recursion

Matelasse opened this issue · 1 comments

Describe the bug
Given the following nested hierarchy:

start_dir
├── a
├── b
├── c
│   ├── cc1
│   └── cc2
└── u
    ├── uu1
    └── uu2

nomino's recursion goes only 1 level deep.

Command

➜  nomino -tpkr ".*/(.*)/(.*)" "start_{}_{}"

This should create start_c_cc1,start_c_cc2,start_u_uu1,start_u_uu2
Instead, nomino stops looking at items located in c and u folders.

Version (nomino -V)
nomino 0.3.1

Environment

  • OS: Linux 5.6.4

Considering your tree, the following command generates what you expected:

➜  tree
.
├── a
├── b
├── c
│   ├── cc1
│   └── cc2
└── u
    ├── uu1
    └── uu2

➜  nomino -tpkr "(.*)/(.*)" "start_{}_{}" 
+-------+-------------+
| Input | Output      |
+-------+-------------+
| c/cc1 | start_c_cc1 |
| c/cc2 | start_c_cc2 |
| u/uu1 | start_u_uu1 |
| u/uu2 | start_u_uu2 |
+-------+-------------+

first (.*) matches the sub-directories inside start_dir, the second one matches the items inside sub-directories.