Skip to content

Commit

Permalink
Work with versions like '2.9a'
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrunberg committed Nov 12, 2019
1 parent e41392a commit feff9cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tmuxomatic
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ def tmux_version(): # -> name, version
result = [ line.strip() for line in result.split("\n") if line.strip() ]
name = result[0].split(" ", 1)[0] # Name that was reported by tmux (should be "tmux")
version = result[0].split(" ", 1)[1] # Only the version is needed
version = re.sub(r'[a-z]', '', version, re.I) # remove caracters from version (i.e: 2.9a is 2.9)
return name, version

def signal_handler_break( signal_number, frame ):
Expand Down

0 comments on commit feff9cc

Please sign in to comment.