Change how current session is found. Fixes #7

1.0.0rc1
benmills 12 years ago
parent 359fb925b7
commit aeb965ce13

@ -178,7 +178,7 @@ end
class CurrentTmuxSession < TmuxSession class CurrentTmuxSession < TmuxSession
def initialize def initialize
session = self.get_property(:attached, :session) session = self.get_session
window = self.get_property(:active, :window) window = self.get_property(:active, :window)
pane = self.get_property(:active, :pane) pane = self.get_property(:active, :pane)
@ -190,5 +190,9 @@ class CurrentTmuxSession < TmuxSession
return line.split(':').first if line =~ /\(#{match.to_s}\)/ return line.split(':').first if line =~ /\(#{match.to_s}\)/
end end
end end
def get_session
_run("list-panes -F '\#\{session_name\}'").split("\n").first.strip
end
end end
EOF EOF

Loading…
Cancel
Save