Skip to content
Myr

Merge pull request #650 from TDaglis/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Recognise cygwin platform and open urls accordingly

authored by Markus Unterwaditzer · committed by GitHub · parents 7a48f3e, 97b6cbd · Browse files · 2 files+11 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+11 added−1 removed

  • other:+11 added−1 removed

2 files+11 added−1 removed

modified:click/_compat.py+1 added
6 unmodified lines
789PY2 = sys.version_info[0] == 210WIN = sys.platform.startswith('win')11CYGWIN = sys.platform.startswith('cygwin')12DEFAULT_COLUMNS = 80131415_ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])')
630 unmodified lines
modified:click/_termui_impl.py+10 added-1 removed
12 unmodified lines
13import sys14import time15import math16from ._compat import _default_text_stdout, range_type, PY2, isatty, \17 open_stream, strip_ansi, term_len, get_best_encoding, WIN, int_types17 open_stream, strip_ansi, term_len, get_best_encoding, WIN, int_types, \18 CYGWIN19from .utils import echo20from .exceptions import ClickException2122
455 unmodified lines
478 else:479 args = 'start %s "" "%s"' % (480 wait and '/WAIT' or '', url.replace('"', ''))481 return os.system(args)482 elif CYGWIN:483 if locate:484 url = _unquote_file(url)485 args = 'cygstart "%s"' % (os.path.dirname(url).replace('"', ''))486 else:487 args = 'cygstart %s "%s"' % (488 wait and '-w' or '', url.replace('"', ''))489 return os.system(args)490491 try:492 if locate:493 url = os.path.dirname(_unquote_file(url)) or '.'
63 unmodified lines