Skip to content
Myr

Recognise cygwin platform and open urls accordingly

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

authored by TDaglis · committed by TDaglis · parent 7a48f3e · Browse files · 2 files+10 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+10 added−1 removed

  • other:+10 added−1 removed

2 files+10 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+9 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 pass485 else:486 args = 'cygstart %s "%s"' % (487 wait and '-w' or '', url.replace('"', ''))488 return os.system(args)489490 try:491 if locate:492 url = os.path.dirname(_unquote_file(url)) or '.'
63 unmodified lines