mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 08:18:08 +02:00
More work on file transmission
This commit is contained in:
@@ -141,6 +141,10 @@ def home_path() -> str:
|
||||
return _home or os.path.expanduser('~')
|
||||
|
||||
|
||||
def cwd_path() -> str:
|
||||
return _cwd or os.getcwd()
|
||||
|
||||
|
||||
def expand_home(path: str) -> str:
|
||||
if path.startswith('~' + os.sep) or (os.altsep and path.startswith('~' + os.altsep)):
|
||||
return os.path.join(home_path(), path[2:].lstrip(os.sep + (os.altsep or '')))
|
||||
|
||||
Reference in New Issue
Block a user