fix: hidden don't works on some files (#188)

like --hidden '*.abc-cba' matches xyz.abc-cba but do not matches 123.xyz.abc-cba
This commit is contained in:
sigoden
2023-03-03 07:15:46 +08:00
committed by GitHub
parent 45f4f5fc58
commit 0e12b285cd
4 changed files with 23 additions and 47 deletions

View File

@@ -243,21 +243,18 @@ Since dufs only allows viewing/downloading, `admin` can only view/download files
### Hide Paths
Dufs supports hiding paths from directory listings via option `--hidden`.
Dufs supports hiding paths from directory listings via option `--hidden <glob>,...`.
```
dufs --hidden .git,.DS_Store,tmp
```
`--hidden` also supports a variant glob:
- `?` matches any single character
- `*` matches any (possibly empty) sequence of characters
- `**`, `[..]`, `[!..]` is not supported
> The glob used in --hidden only matches file and directory names, not paths. So `--hidden dir1/file` is invalid.
```sh
dufs --hidden '.*'
dufs --hidden '*.log,*.lock'
dufs --hidden '.*' # hidden dotfiles
dufs --hidden '*/' # hidden all folders
dufs --hidden '*.log,*.lock' # hidden by exts
```
### Log Format