Skip to content

Commit 89e3474

Browse files
committed
allow periods in script names
- fixes #20
1 parent dacf521 commit 89e3474

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shtab/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ def replace_format(string, **fmt):
153153

154154

155155
def wordify(string):
156-
"""Replace hyphens (-) and spaces ( ) with underscores (_)"""
157-
return string.replace("-", "_").replace(" ", "_")
156+
"""Replace non-word chars [-. ] with underscores [_]"""
157+
return string.replace("-", "_").replace(".", " ").replace(" ", "_")
158158

159159

160160
def get_bash_commands(root_parser, root_prefix, choice_functions=None):

0 commit comments

Comments
 (0)