This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2019年03月17日 02:48 by terry.reedy, last changed 2022年04月11日 14:59 by admin.
| Messages (4) | |||
|---|---|---|---|
| msg338115 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月17日 02:48 | |
The second line of the Find in Files dialog is In files: [____________________________________] When this is opened in the startup directory, Shell or an untitled editor, the entry starts as '*.py'. When this is opened in an titled editor file, the initial entry is the full path. A full path is much more useful and should always be given. |
|||
| msg338118 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月17日 04:52 | |
To be more exact, if 'Find in Files' is called in an unsaved editor window, including Output windows, the the entry starts as '*.py'. I presume that this is relative to the current working directory, which is initially the startup directory. But this can change in an undocumented way. There is currently no way in a grep output to determine which directory was searched. This is especially annoying when there are no hits and one knows that there should be some. My initial thought was to prefix '*.py' with the directory of sys.executable. os.getcwd() might be more useful. This would be in GrepDialog.open. This will still be untested after PR12203 for #23205. Most of this method is self-free path manipulation that can be pulled into a module method and separately tested. PR12203 adds os.curdir ('.') to no-directory patterns. After this issue, that will not be necessary unless a user deletes the explicit directory. I am pausing a PR for this issue until I finish reviewing that one and it is merged. In the long run, I might like to separate the 'In files' glob path into 'Directory' and file glob pattern. (On Windows at least, glob patterns are not allowed in the directory part of the pattern.) A related improvement would be listing the base search directory once at the top of output windows and not repeat it on every hit line. This would require revising the GoTo File/Line function. |
|||
| msg338468 - (view) | Author: Cheryl Sabella (cheryl.sabella) * (Python committer) | Date: 2019年03月20日 13:04 | |
See also #21960. I'm going to close that one in favor of this issue. |
|||
| msg338525 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2019年03月21日 04:50 | |
Thanks. I somehow never marked it for IDLE. Using groupby components, I discovered another +-10 and marked them and included in my list. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:12 | admin | set | github: 80504 |
| 2019年03月21日 04:50:10 | terry.reedy | set | messages: + msg338525 |
| 2019年03月20日 13:04:55 | cheryl.sabella | link | issue21960 superseder |
| 2019年03月20日 13:04:18 | cheryl.sabella | set | messages: + msg338468 |
| 2019年03月17日 12:47:22 | eamanu | set | nosy:
+ eamanu |
| 2019年03月17日 04:52:43 | terry.reedy | set | nosy:
+ cheryl.sabella messages: + msg338118 |
| 2019年03月17日 02:48:55 | terry.reedy | create | |