Skip to content

Instantly share code, notes, and snippets.

@desnudopenguino
Created March 26, 2017 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desnudopenguino/9a8f7790d016d13d1a3769b634c86c06 to your computer and use it in GitHub Desktop.
Save desnudopenguino/9a8f7790d016d13d1a3769b634c86c06 to your computer and use it in GitHub Desktop.
libtmux hack fix to use it in OpenBSD's tmux (libtmux/common.py)
" Starting at line 401
403 " OpenBSD doesn't use -V, so make sure it is > 5.8 "
1 import platfor9
2 os = platform.system()
3 rel = platform.release()
4
5 if not version:
6 proc = tmux_cmd('-V')
7 " OpenBSD hack "
8 if os != 'OpenBSD' and float(rel) <= 5.9:·
9 if proc.stderr:
10 if proc.stderr[0] == 'tmux: unknown option -- V':
11 raise exc.LibTmuxException(
12 'libtmux supports tmux 1.8 and greater. This system'
13 ' is running tmux 1.3 or earlier.')
14 raise exc.LibTmuxException(proc.stderr)
15
16 version = proc.stdout[0].split('tmux ')[1]
17 else:
18 version = '1.8'
19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment