Here's something I manage to do every month or so:
nc foo * # No! I meant foo* !!
The result is hundreds of windows popping up with no way to stop it. If I'm lucky, my session won't crash or run out of memory.
The preferable solution is: if the number of files is more than 10 or 20, present a modal dialog that says "Opening file N of X..." that has a cancel button on it. Window manager interaction may make this tricky. If I ignore the dialog and let it go, then it goes away automatically after all are open. However, if I made the typo and it's trying to open 1000 files, I hit cancel.
A simpler (but more annoying) solution is if N is over the threshold, post a dialog: "Are you sure you want to load X files all at once?". Having a listbox to change it on the fly without retyping may be nice. A command line option may be needed to override this.
Log in to post a comment.