@@ -393,11 +393,11 @@ def prompt(
393
393
self ,
394
394
prompt : str ,
395
395
* ,
396
+ file_glob : bool ,
396
397
allow_empty : bool = False ,
397
398
history : str | None = None ,
398
399
default_prev : bool = False ,
399
400
default : str | None = None ,
400
- file_glob : bool = False ,
401
401
) -> str | PromptResult :
402
402
default = default or ''
403
403
self .status .clear ()
@@ -425,7 +425,7 @@ def prompt(
425
425
return ret
426
426
427
427
def go_to_line (self ) -> None :
428
- response = self .prompt ('enter line number' )
428
+ response = self .prompt ('enter line number' , file_glob = False )
429
429
if response is not PromptResult .CANCELLED :
430
430
try :
431
431
lineno = int (response )
@@ -456,7 +456,9 @@ def uncut(self) -> None:
456
456
self .file .uncut (self .cut_buffer , self .layout .file )
457
457
458
458
def _get_search_re (self , prompt : str ) -> Pattern [str ] | PromptResult :
459
- response = self .prompt (prompt , history = 'search' , default_prev = True )
459
+ response = self .prompt (
460
+ prompt , history = 'search' , default_prev = True , file_glob = False ,
461
+ )
460
462
if response is PromptResult .CANCELLED :
461
463
return response
462
464
try :
@@ -495,7 +497,10 @@ def replace(self) -> None:
495
497
search_response = self ._get_search_re ('search (to replace)' )
496
498
if search_response is not PromptResult .CANCELLED :
497
499
response = self .prompt (
498
- 'replace with' , history = 'replace' , allow_empty = True ,
500
+ 'replace with' ,
501
+ history = 'replace' ,
502
+ allow_empty = True ,
503
+ file_glob = False ,
499
504
)
500
505
if response is not PromptResult .CANCELLED :
501
506
try :
@@ -686,7 +691,7 @@ def _command_retheme(self, args: list[str]) -> None:
686
691
}
687
692
688
693
def command (self ) -> EditResult | None :
689
- response = self .prompt ('' , history = 'command' )
694
+ response = self .prompt ('' , history = 'command' , file_glob = False )
690
695
if response is PromptResult .CANCELLED :
691
696
return None
692
697
0 commit comments