-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
- Category
- fzf binary
- fzf-tmux script
- Key bindings
- Completion
- Vim
- Neovim
- Etc.
- OS
- Linux
- Mac OS X
- Windows
- Windows Subsystem for Linux
- Etc.
- Shell
- bash
- zsh
- fish
dir /s/b
does not filter hidden directories/files and its results cannot be piped to another dir
command.
I can't get dir /b/a:-d-h | dir /s/b
to work in cmd.exe to filter hidden directories before recursing on subfolders.
Powershell does not have these issues because of object piping and output customization.
The following command works in cmd.exe and runs powershell on default settings to recursively get all non-hidden files. This takes up more time but removes files in hidden directories such as .git
. Additional parameters are added to the powershell.exe to reduce the startup time.
powershell.exe -NoLogo -NoProfile -Noninteractive -Command "Get-ChildItem -File -Recurse | ForEach-Object {echo $_.FullName}"
Edit:
Get-ChildItem
supports -Name
for relative path so object piping is not required.
powershell.exe -NoLogo -NoProfile -Noninteractive -Command "Get-ChildItem -File -Recurse -Name"