From 329141766c59984ca066cf9685f3801a4ba8d8ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= <hugo@lysator.liu.se> Date: Thu, 7 Jan 2021 05:09:26 +0100 Subject: [PATCH] Add comment about missing --help for open. --- git-open | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git-open b/git-open index 5782da9..ee5e2a1 100755 --- a/git-open +++ b/git-open @@ -24,7 +24,11 @@ def remote_url(remote_name): def to_http(url): if url[0:4] == "http": - return url + if "aur.archlinux.org" in url: + parts = url.split('/') + return '/'.join(parts[0:-1] + ['packages'] + [parts[-1]]) + else: + return url if url[0:4] == "git@": base, path = url[4:].split(":") return "https://" + base + "/" + path @@ -80,6 +84,8 @@ def main(args): err("All remotes failed") if __name__ == "__main__": + # Note that argparse gives `--help' and `-h', but git "eats" + # `--help'. `-h' does however work. parser = argparse.ArgumentParser(description='open git remotes in web browser') parser.add_argument('-n', '--dry-run', action='store_true', dest='dry_run') parser.add_argument('remote', action='store', nargs='?') -- GitLab