Bug 124708 - When invoked with multiple arguments, do not open windows for directories
Summary: When invoked with multiple arguments, do not open windows for directories
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: 0.2
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-01 18:30 UTC by Wolfram R. Sieber
Modified: 2007-12-12 23:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram R. Sieber 2006-04-01 18:30:42 UTC
Version:           1.3 (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-13)
OS:                Linux (i686) release 2.6.8-2-k7

I started kedit using the Alt-F2 command window starring "kedit /var/www/*". In /var/www/ lay several files/directories.

What happened:
1. kedit opened its window
2. immediately after a dialog mentioning that the given name was a folder.

The dialog offers an OK button, which I clicked then.

3. see 1.

This might be an endless loop -- but I was to lazy to check it fully out. After half a dozen of empty kedit windows I took xkill.
Comment 1 Wolfram R. Sieber 2006-04-01 18:31:42 UTC
I'd suggest to open a file dialog when just a directory name is given.
Comment 2 Thiago Macieira 2006-04-04 10:10:27 UTC
Not a bug. You told it to open the directory in a text editor.

  kedit fileA fileB
will open two windows

  kedit *
will open as many windows as there are entries in the current directory, including for sub-directories. It was not meant to be run that way.
Comment 3 Wolfram R. Sieber 2006-04-04 15:43:17 UTC
I see the point. As far as I understand your reply, kedit gets invoked by a shell command, which implicitely expands the '*'. So, nice, that it is not a bug, but in the end at least it is annoying.

Would be nice, if a workaround for that could be applied by default. At least, kedit shouldn't try to open a folder, should it? Then it would be nice, if kedit would be as smart enough as to not attempt to open a folder, i.e. not to open an empty window to *then* recognize, "oops, that was a folder, which I cannot display".

These empty windows are a complete waste of desktop estate.
Comment 4 Thiago Macieira 2006-04-04 19:12:03 UTC
I agree.

But I am reassigning to kwrite, which has a similar problem. kedit has been deprecated for years.
Comment 5 Wolfram R. Sieber 2006-04-04 21:33:23 UTC
> deprecated for years
Uh -- didn't know. It was just part of the Debian kde package, so I installed it in addition to kwrite and kate.
Comment 6 Thomas Friedrichsmeier 2007-11-26 18:18:22 UTC
SVN commit 741889 by tfry:

When the url argument was an obvious mistake or shell expansion gone wrong, do not open a text editor window.
Just display a message and quit.
BUG: 124708
CCBUG: 124708

 M  +4 -3      kwritemain.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=741889
Comment 7 Thomas Friedrichsmeier 2007-12-12 23:55:17 UTC
Oh, I had meant to close this with the above commit message, but did not yet have permission do use that sort of magic, then. Anyway, this should now be fixed. Closing.