README guide
This commit is contained in:
parent
648432ef46
commit
207cc4934b
33
README.md
33
README.md
|
@ -22,61 +22,66 @@ The **search** pattern can be:
|
|||
- an expression whith wild card supporting the shell expansion, the default
|
||||
- a regular expression, using the flag -re
|
||||
|
||||
The only thing that needs to be remembered is to wrap in double quote the regular expression in conjunction with the **-re** flag
|
||||
when you choose to use it, for example:
|
||||
|
||||
```
|
||||
vfind ~/nerd_tree/ -re "(.*)rem(.*)"
|
||||
vfind ~/nerd_tree/ -re '(.*)rem(.*)'
|
||||
```
|
||||
|
||||
all items matching the pattern are show in the result tree: in this specific case any name containing **rem** substring<br />
|
||||
The same results above can be achieved using the command version with the shell expansion:
|
||||
|
||||
```
|
||||
vfind ~/nerd_tree/ *rem*
|
||||
vfind ~/nerd_tree/ '*rem*'
|
||||
```
|
||||
|
||||
You can use as pattern any valid regular expression, for example pattern as this
|
||||
|
||||
```
|
||||
vfind ~/nerd_tree/ -re "(.*)rem|tree(.*)"
|
||||
vfind ~/nerd_tree/ -re '(.*)rem|tree(.*)'
|
||||
```
|
||||
|
||||
The folder matching the pattern are show collapsed with information about the total number of files and the size of the subtree.
|
||||
If you want to show the subtree expanded you can use the flag **-s**
|
||||
|
||||
```
|
||||
vfind ~/nerd_tree/ -re "(.*)rem(.*)" -s
|
||||
vfind ~/nerd_tree/ -re '(.*)rem(.*)' -s
|
||||
```
|
||||
|
||||
## Include/Exclude path
|
||||
|
||||
You can include a set of results selecting specific branch (or paths) with the option **-i** (include).
|
||||
For example:
|
||||
In this case the match is made exactly on the pattern provided, for example:
|
||||
|
||||
```
|
||||
vfind ~/nerd_tree/ -re "(.*)py" -i src
|
||||
vfind ~/nerd_tree/ -re '(.*)py' -i src
|
||||
```
|
||||
|
||||
include the results that along the path have the name **src**.<br />
|
||||
**NOTE** the command above is equivalent to
|
||||
|
||||
```
|
||||
vfind ~/nerd_tree/ *py -i src
|
||||
vfind ~/nerd_tree/ '*py' -i src
|
||||
```
|
||||
|
||||
You can include the -i more than once, for example:
|
||||
You can include the -i more than once as in this case:
|
||||
|
||||
```
|
||||
vfind ~/nerd_tree/ -re "([0-9][0-9])|(^tree_(.*))" -i src -i .git
|
||||
vfind ~/nerd_tree/ -re '([0-9][0-9])|(^tree_(.*))' -i src -i .git
|
||||
```
|
||||
|
||||
the above command will search for files or folders with a **two digits** name or with the name beginning with **tree_**
|
||||
only in the path ***src*** or ***.git***
|
||||
|
||||
|
||||
In a similar manner you can exclude paths with the option **-e**, too in this case you can specify more than once the option -e
|
||||
In a similar manner you can exclude from the results tree paths or items with the option **-e**.
|
||||
|
||||
> The **-e** option can be any valid pattern that support the shell expansion
|
||||
|
||||
too in this case you can specify more than once the option -e
|
||||
|
||||
```
|
||||
vfind ~/nerd_tree/ -re "(.*)py" -e src
|
||||
vfind ~/nerd_tree/ -re '(.*)py' -e src
|
||||
```
|
||||
|
||||
```
|
||||
vfind -e .git -e __pycache__ ~/nerd_tree/ 'ntree*'
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue