From e56bf3606b975c828ae20aae085933ad92820699 Mon Sep 17 00:00:00 2001 From: ZyX Date: Fri, 10 Jan 2014 23:01:32 +0400 Subject: [PATCH] Add Args.jobnum property Fixes #742 --- powerline/bindings/zsh/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/powerline/bindings/zsh/__init__.py b/powerline/bindings/zsh/__init__.py index ede6870a..5acdc39f 100644 --- a/powerline/bindings/zsh/__init__.py +++ b/powerline/bindings/zsh/__init__.py @@ -53,6 +53,11 @@ class Args(object): except IndexError: return None + @property + def jobnum(self): + zsh.eval('integer POWERLINE_JOBNUM=${(%):-%j}') + return zsh.getvalue('POWERLINE_JOBNUM') + def string(s): if type(s) is bytes: