diff -r 867c3649be5d -r 6ddc86eedc3b hgext/keyword.py --- a/hgext/keyword.py Fri Mar 13 14:20:13 2015 -0400 +++ b/hgext/keyword.py Fri Mar 13 17:00:06 2015 -0400 @@ -506,7 +506,10 @@ kwt = kwtools['templater'] wctx = repo[None] status = _status(ui, repo, wctx, kwt, *pats, **opts) - cwd = pats and repo.getcwd() or '' + if pats: + cwd = repo.getcwd() + else: + cwd = '' files = [] if not opts.get('unknown') or opts.get('all'): files = sorted(status.modified + status.added + status.clean)