by rdl · 13y ago · 0 comments
What I'd really like is a way to specify files within zsh, then open a new finder window with just those files in it, without moving them. Right now, I can do "open ." and get a Finder window with the current working directory, but what I want is something like "openw [1-5]*/" and get a new finder window containing just things matching that. They could easily be in multiple directories too.
Something like:
mkdir "$HOME/.virtualdirs" 2> /dev/null
tempdir=$(mktemp -d -p "$HOME/.virtualdirs")
for file in $*; do
ln "$file" "$tempdir/$(basename $file)"
done
thunar "$tempdir" #replace thunar with your file manager
rm -r "$tempdir"
Ok, now that it works, you just need the other 999.75 hours to make it into a real application ;)