command line argument --select file1 file2 opens two nautilus windows even though files are in same directory
Use cases
nautilus --select file1 file2
does not open one nautilus window with both files selected, even though both file1 and file2 are in the same directory. It instead opens two separate nautilus windows, with file1 selected in one window, and file2 selected in another. The same issue applies to more than two files, obviously — for N files, there will be N nautilus windows.
Desired behavior
nautilus --select file1 file2 file3... fileN
should open only as many windows as needed to display the files. Because all the listed files may not be in the same directory, nautilus should determine which files are in the same directory and open the minimum number of nautilus windows necessary to display and select the files. Incidentally, this desired behavior is currently found in both KDE's dolphin and Kylin's peony (very latest versions of each tested).
Benefits of the solution
The --select
command becomes more usable when more than one file is selected.
Possible drawbacks
I am unaware of any workflow in which opening multiple windows to select files from the same directory would benefit the user, but comments or concerns I have not thought of are of course welcome.