@@ -1052,7 +1052,9 @@ def __init__(self, completekey='tab', stdin=None, stdout=None, persistent_histor
10521052
10531053 # If a startup script is provided, then add it in the queue to load
10541054 if startup_script is not None :
1055- self .cmdqueue .append ('load {}' .format (startup_script ))
1055+ startup_script = os .path .expanduser (startup_script )
1056+ if os .path .exists (startup_script ) and os .path .getsize (startup_script ) > 0 :
1057+ self .cmdqueue .append ('load {}' .format (startup_script ))
10561058
10571059 ############################################################################################################
10581060 # The following variables are used by tab-completion functions. They are reset each time complete() is run
@@ -2747,8 +2749,8 @@ def do_alias(self, arglist):
27472749
27482750Usage: Usage: alias [name] | [<name> <value>]
27492751 Where:
2750- name - name of the alias being looked up, added, or edited
2751- value - what the alias will be resolved to (if adding or editing )
2752+ name - name of the alias being looked up, added, or replaced
2753+ value - what the alias will be resolved to (if adding or replacing )
27522754 this can contain spaces and does not need to be quoted
27532755
27542756 Without arguments, 'alias' prints a list of all aliases in a reusable form which
@@ -2780,7 +2782,7 @@ def do_alias(self, arglist):
27802782 if name in self .aliases :
27812783 self .poutput ("alias {} {}" .format (name , self .aliases [name ]))
27822784 else :
2783- self .perror ("Alias '{}' not found" .format (name ), traceback_war = False )
2785+ self .perror ("Alias {!r} not found" .format (name ), traceback_war = False )
27842786
27852787 # The user is creating an alias
27862788 else :
@@ -2796,7 +2798,7 @@ def do_alias(self, arglist):
27962798
27972799 # Set the alias
27982800 self .aliases [name ] = value
2799- self .poutput ("Alias created" )
2801+ self .poutput ("Alias {!r} created" . format ( name ) )
28002802
28012803 def complete_alias (self , text , line , begidx , endidx ):
28022804 """ Tab completion for alias """
0 commit comments