@@ -3398,7 +3398,7 @@ def do_run_pyscript(self, args: argparse.Namespace) -> Optional[bool]:
3398
3398
sys .argv = [args .script_path ] + args .script_arguments
3399
3399
3400
3400
# noinspection PyTypeChecker
3401
- py_return = self .do_py ('--pyscript {}' .format (utils .quote_string_if_needed (args .script_path )))
3401
+ py_return = self .do_py ('--pyscript {}' .format (utils .quote_string (args .script_path )))
3402
3402
3403
3403
except KeyboardInterrupt :
3404
3404
pass
@@ -3554,10 +3554,10 @@ def do_history(self, args: argparse.Namespace) -> Optional[bool]:
3554
3554
fobj .write ('{}\n ' .format (command .raw ))
3555
3555
try :
3556
3556
# noinspection PyTypeChecker
3557
- self .do_edit (utils .quote_string_if_needed (fname ))
3557
+ self .do_edit (utils .quote_string (fname ))
3558
3558
3559
3559
# noinspection PyTypeChecker
3560
- self .do_run_script (utils .quote_string_if_needed (fname ))
3560
+ self .do_run_script (utils .quote_string (fname ))
3561
3561
finally :
3562
3562
os .remove (fname )
3563
3563
elif args .output_file :
@@ -3754,9 +3754,9 @@ def do_edit(self, args: argparse.Namespace) -> None:
3754
3754
if not self .editor :
3755
3755
raise EnvironmentError ("Please use 'set editor' to specify your text editing program of choice." )
3756
3756
3757
- command = utils .quote_string_if_needed (os .path .expanduser (self .editor ))
3757
+ command = utils .quote_string (os .path .expanduser (self .editor ))
3758
3758
if args .file_path :
3759
- command += " " + utils .quote_string_if_needed (os .path .expanduser (args .file_path ))
3759
+ command += " " + utils .quote_string (os .path .expanduser (args .file_path ))
3760
3760
3761
3761
# noinspection PyTypeChecker
3762
3762
self .do_shell (command )
@@ -3867,7 +3867,7 @@ def do__relative_run_script(self, args: argparse.Namespace) -> Optional[bool]:
3867
3867
relative_path = os .path .join (self ._current_script_dir or '' , file_path )
3868
3868
3869
3869
# noinspection PyTypeChecker
3870
- return self .do_run_script (utils .quote_string_if_needed (relative_path ))
3870
+ return self .do_run_script (utils .quote_string (relative_path ))
3871
3871
3872
3872
def _run_transcript_tests (self , transcript_paths : List [str ]) -> None :
3873
3873
"""Runs transcript tests for provided file(s).
0 commit comments