Run os.path.expanduser() on all args paths (!1731)

Properly replace ~ with $HOME in all paths. Fix tab completion when
passing a path starting with ~ to pmaports:

$ pmbootstrap --aports ~/src/pmaports/ build linux-<TAB>
This commit is contained in:
Oliver Smith 2018-12-17 07:58:27 +01:00
parent 1662fc1961
commit 23df933db4
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 13 additions and 5 deletions

View file

@ -252,7 +252,7 @@ def arguments_repo_missing(subparser):
def packagecompleter(prefix, action, parser, parsed_args):
args = parsed_args
pmb.config.merge_with_args(args)
pmb.helpers.args.replace_variables(args)
pmb.helpers.args.replace_placeholders(args)
packages = set(pmb.helpers.pmaports.get_list(args))
return packages