Mislav Marohnić
a2bee1fad3
🔥 utils.Spinner
2021-01-20 14:48:14 +01:00
Sam Coe
c843a4fa13
Add issue comment viewing
2020-12-07 14:25:04 -05:00
vilmibm
a2aa154794
port entirely to ColorScheme
2020-10-29 12:37:45 -07:00
Dimitris Apostolou
6f550b5d12
Fix typos
2020-10-04 22:16:30 +03:00
Nate Smith
b987cfb39e
Merge pull request #1955 from thealamu/trunk
...
Avoid interface for collecting file descriptors
2020-09-29 11:37:33 -05:00
Faithfulness Alamu
0206648175
Avoid interface for collecting file descriptors
...
Avoid using interface{} as a catch-all in IsTerminal and
IsCygwinTerminal functions.
The use of *os.File allows for static type error checks.
2020-09-25 11:31:22 +01:00
Sam Coe
ed4075517c
Check for terminal background color before starting pager
2020-09-24 13:06:28 +02:00
zacanger
f17d9672f5
fix(browser): show message if $BROWSER isn't in $PATH ( #1749 )
2020-09-23 12:17:54 +02:00
Mislav Marohnić
88aacc14f0
Fix gray color presentation across terminals
...
We used to send the ANSI sequence for "bright black" when we wanted gray, but this color turns out to not be visible in some popular color schemes.
Instead, when we detect a 256-color terminal, switch to displaying a color sequence for gray that is consistent and does not depend on terminal color scheme.
2020-09-16 17:57:13 +02:00
Mislav Marohnić
086d8ed29a
Merge remote-tracking branch 'origin' into color-env
2020-09-16 16:51:38 +02:00
Mislav Marohnić
d38a0c5d84
Encapsulate checking color-controlling environment variables
2020-09-07 13:10:43 +02:00
Mislav Marohnić
ca2f2b18ca
Add support for CLICOLOR "standard"
...
The CLICOLOR_FORCE environment variable can now be used to force color
output even when stdout is redirected. https://bixense.com/clicolors/
2020-09-04 21:32:58 +02:00
vilmibm
8dd93e1748
gh pr checks
...
A basic first pass on gh pr checks that shows all check runs for a given
PR's latest commit.
2020-08-28 13:18:59 -05:00
Mislav Marohnić
fcaf912961
Merge branch 'pr-commands-isolate-2' into pr-commands-isolate-3
2020-08-11 15:30:09 +02:00
vilmibm
35f18b6c02
gh auth login
2020-08-06 12:43:35 -05:00
Mislav Marohnić
82661c197e
Isolate pr list command
2020-08-04 18:38:06 +02:00
Shubhankar Kanchan Gupta
bb6851c88b
Add "open" qualifier when listing open issues/PRs ( #1457 )
2020-07-31 18:22:08 +02:00
Jesse Millar
90f04d4864
Enable custom color themes with the GLAMOUR_STYLE environment variable
2020-07-28 15:23:48 +02:00
vilmibm
086fb48d31
move displayURL
2020-07-23 11:25:31 -05:00
vilmibm
70c948a751
move isURL
2020-07-23 11:23:45 -05:00
Mislav Marohnić
cbcc778d20
Adapt markdown rendering for light terminal backgrounds
...
Bonus: disallows trying to first read `notty` and `dark` style files from disk
2020-07-21 13:16:42 +02:00
vilmibm
b7765591b7
remove package level terminal check state
2020-07-17 15:02:05 -05:00
vilmibm
36ade42ba3
scriptability improvements: issue commands
...
This commit is part of work to make gh more scriptable. It includes both
some general purpose helpers towards this goal as well as improvements
to the issue commands. Other commands will follow.
- Adds `utils/terminal.go` for finding out about gh's execution environment
- introduces `stubTerminal` for either faking being attached to a tty or not during tests
- updates issue commands to behave better when not attached to a tty:
- issue list doesn't print fuzzy dates
- issue list doesn't print header
- issue list prints state explicitly
- issue create no longer hangs
- issue create fails with clear error unless both -t and -b are specified
- issue view prints raw issue body
- issue view prints metadata in a consistent, linewise format
2020-07-14 12:30:53 -05:00
Shubhankar Kanchan Gupta
1ddb4d76a7
Strip carriage returns in markdown rendering ( #1351 )
2020-07-10 16:01:15 +02:00
Mislav Marohnić
ac7d5ecc44
Ensure markdown still passed through Glamour in no-color mode
2020-06-22 19:44:16 +02:00
Mislav Marohnić
04b18ea8cb
🔥 unused var
2020-06-22 19:32:06 +02:00
Mislav Marohnić
55be0d2a9c
Tweak isColorEnabled
2020-06-22 19:18:18 +02:00
gabgodBB
e6e8f701a2
Issue #930 - Removing color for output files
2020-06-12 14:26:38 -03:00
gedenata
4c94d126da
variable global color
2020-06-10 14:02:42 +08:00
gedenata
81799caeb6
variable global color
2020-06-10 13:59:28 +08:00
gedenata
417de6257a
variable global color
2020-06-10 13:57:31 +08:00
vilmibm
15a6225f05
totally inelegant approach to hopefully stopping flakey tests
2020-04-29 14:17:16 -05:00
Mislav Marohnić
aa183d7408
Set spinner writer stream in a preferred way
2020-04-13 14:09:56 +02:00
Mislav Marohnić
250114e2c0
Merge pull request #742 from brettbuddin/no-color
...
Support NO_COLOR environment variable to disable color
2020-04-03 19:10:16 +02:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures ( #738 )
2020-04-03 16:33:34 +02:00
Brett Buddin
0cc41b4912
Provide notty style to glamour when colors are disabled.
2020-04-02 21:09:29 -04:00
Brett Buddin
48e7df2337
Any non-empty value should be a disabling intent.
...
Conforms to the informal standard proposed in https://no-color.org
2020-04-02 20:31:04 -04:00
Brett Buddin
21e445beab
Support NO_COLOR environment variable to disable color.
2020-04-02 20:22:55 -04:00
vilmibm
f4b8851011
Merge remote-tracking branch 'origin/master' into pr-status-no-commits
2020-03-25 12:00:58 -05:00
vilmibm
5187ad4431
move preparecmd and Runnable to its own package
2020-03-23 16:32:29 -05:00
Mislav Marohnić
488b47bded
Enable tests to capture spinner output
...
Explicitly assign the writer stream for the progress spinner so that
tests may override it.
The default when not in testing stays the same: the output stream is the
colorable stdout.
2020-03-20 18:18:27 +01:00
vilmibm
0344e9543a
humanize branch name for title
2020-03-17 16:18:32 -05:00
Christian Muehlhaeuser
0d6e347155
Bump glamour dependency
...
This indirectly also updates the chroma syntax highlighting package,
which fixes a rendering bug for CRLF line endings, which we
encountered in cli. We can therefore remove our internal work-around.
2020-03-04 15:03:04 +01:00
Nate Smith
3d7733870e
Merge branch 'master' into repo-fork
2020-03-03 15:40:54 -06:00
vilmibm
1217bfce09
add spinner helper
2020-02-26 11:41:54 -06:00
Dasio
9289ab99f2
Use var syntax when empty struct is initialized
2020-02-24 22:33:22 +01:00
Mislav Marohnić
9c2efd6c1c
Extract reusable IsTerminal()
2020-02-21 12:46:21 +01:00
Mislav Marohnić
4c3e498021
Fix column alignment and truncation for Eastern Asian languages
...
- Ensure that text is never truncated mid-character, which would result
in garbled text
- Ensure that columns in `issue/pr list` output align properly
2020-02-20 18:52:17 +01:00
Nate Smith
c65ac4ae9d
Merge branch 'master' into glamour-markdown
2020-02-18 14:23:49 -06:00
Mislav Marohnić
61ff5d73bd
Fix crash in issue/pr list for narrow terminals
...
If the available column width is smaller than 3, don't try to truncate
with ellipsis (`...`). Instead, just truncate to available width.
2020-02-18 20:03:09 +01:00