File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ def cmd_alias(*args)
85
85
# We prevent the user from naming the alias "alias" cuz they could end up unable to clear the aliases,
86
86
# for example you 'alias -f set unset and then 'alias -f alias sessions', now you're screwed. The byproduct
87
87
# of this is that it prevents you from aliasing 'alias' to 'alias -f' etc, but that's acceptable
88
- reserved_words = [ /^alias/i ]
88
+ reserved_words = [ /^alias$ /i ]
89
89
reserved_words . each do |regex |
90
90
if name =~ regex
91
91
print_error "You cannot use #{ name } as the name for an alias, sorry"
@@ -113,7 +113,7 @@ def cmd_alias(*args)
113
113
# smash everything that's left together
114
114
value = args . join ( " " )
115
115
value . strip!
116
- # valule can NEVER be certain bad words like 'rm -rf /', add any other reserved words here
116
+ # value can NEVER be certain bad words like 'rm -rf /', add any other reserved words here
117
117
# this is basic idiot protection, not meant to be impervious to subversive intentions
118
118
reserved_words = [ /^rm +(-rf|-r +-f|-f +-r) +\/ .*$/ ]
119
119
reserved_words . each do |regex |
You can’t perform that action at this time.
0 commit comments