Skip to content

Commit e9a26b5

Browse files
committed
tmuxp.config: Rename expandvars (formerly expandpath) to expandshell.
1 parent 3c809ce commit e9a26b5

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Changelog
44

55
Here you can find the recent changes to tmuxp.
66

7+
CURRENT
8+
-------
9+
10+
- [internal]: Renamed ``config.expandpath`` to ``config.expandshell``.
11+
712
0.8.1
813
-----
914

doc/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Import and export
102102

103103
.. automethod:: tmuxp.config.validate_schema
104104

105-
.. automethod:: tmuxp.config.expandvars
105+
.. automethod:: tmuxp.config.expandshell
106106

107107
.. automethod:: tmuxp.config.expand
108108

tmuxp/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,18 @@ def in_cwd():
102102

103103
return configs
104104

105-
def expandvars(_path):
105+
def expandshell(_path):
106106
"""Return expanded path based on user's ``$HOME`` and ``env``.
107107
108-
:py:func:`os.path.expanduser` and :py:func:`os.path.expandvars`
108+
:py:func:`os.path.expanduser` and :py:func:`os.path.expandshell`
109109
110110
:param _path: path to expand
111111
:type _path: string
112112
:returns: expanded path
113113
:rtype: string
114114
115115
"""
116-
return os.path.expandvars(os.path.expanduser(_path))
116+
return os.path.expandshell(os.path.expanduser(_path))
117117

118118
def inline(sconf):
119119
""" Return config in inline form, opposite of :meth:`config.expand`.
@@ -188,7 +188,7 @@ def expand(sconf, cwd=None, parent=None):
188188
# Any config section, session, window, pane that can contain the
189189
# 'shell_command' value
190190
if 'start_directory' in sconf:
191-
sconf['start_directory'] = expandvars(sconf['start_directory'])
191+
sconf['start_directory'] = expandshell(sconf['start_directory'])
192192
start_path = sconf['start_directory']
193193
if any(start_path.startswith(a) for a in ['.', './']):
194194
# if window has a session, or pane has a window with a

0 commit comments

Comments
 (0)