I want to open files in vs code from terminal based on multiple paths given by a previous command like
find ~ -iname '*.csproj'
I tried find ~ -iname '*csproj' | code
and find ~ -iname '*csproj' | code
but it doesn't work.
PS: I am using Git Bash on Windows
CodePudding user response:
Try
find ~ -iname '*csproj' | xargs code
or
code $(find ~ -iname '*csproj')
The second one only works if the total length of the command does not get too long, that is not too many files are found.