Heath Stewart
bddadef574
Highlight matches in table and content
...
When `--filter` is passed, matches will be highlighted in the existing table. If file names match, the "n file(s)" cell will be highlighted.
When `--include-content` is additionally passed, the file name, description, and/or content will be printed like `search code` with matches highlighted.
2024-10-12 23:17:56 -07:00
Heath Stewart
86f045ef0e
Split all newlines, and output no-color to non-TTY
2024-10-12 23:17:56 -07:00
Heath Stewart
70b14215ec
Print filtered gists similar to code search
2024-10-12 23:17:56 -07:00
Heath Stewart
4eaeda580b
Show progress when filtering
...
Filtering can take a while, so show progress. This also uncovered a bug
that I wasn't checking if a filter was actually specified, resulting in
a non-nil `opts.Filter`.
2024-10-12 23:17:56 -07:00
Heath Stewart
1615f2c1e1
Simplify description
2024-10-12 23:17:56 -07:00
Tyler McGoffin
b56353dc02
Disallow use of --include-content without --filter
2024-10-12 23:17:55 -07:00
Heath Stewart
73af9f8bd9
Improve help docs
...
Also changes `--filter` argument to "expression" to coincide with some other commands' help text e.g., `--jq`.
2024-10-12 23:17:55 -07:00
Heath Stewart
34203d7e6c
Refactor filtering into existing gist list
...
Resolves feedback in issue #9704
2024-10-12 23:17:55 -07:00
Heath Stewart
2fb5687777
Improve performance
...
Filter as we get results instead of getting them all. This allows us to more easily terminate pagination when opts.Limit is reached.
2024-10-12 23:17:55 -07:00
Heath Stewart
8c6d4c9c52
Add gist search command
...
Resolves #9704
2024-10-12 23:17:52 -07:00
Heath Stewart
81f3526740
Fix tests
2024-08-16 10:11:52 -07:00
William Martin
07e0ff7127
Fix repo fork to use remote protocol if none configured
2024-05-10 10:48:36 +02:00
William Martin
1d38230675
Move config interfaces into gh package ( #9060 )
2024-05-10 10:39:36 +02:00
Zack Sloane
b6dadfa7fb
test update, more consistent default value display
2024-01-08 23:23:24 -05:00
Yukai Chou
ba585149c3
Leftovers
2023-11-23 07:12:47 +08:00
Yukai Chou
21bf1babdf
Proof-reading
2023-11-17 02:04:35 +08:00
Yukai Chou
b70c28ba20
Misc docs improvements
2023-11-17 01:32:28 +08:00
Yukai Chou
896101678f
Wrap cli commands in backticks uniformly
2023-11-17 01:32:00 +08:00
Yukai Chou
17d336e005
Wrap cli flags in backticks uniformly
2023-11-16 22:54:27 +08:00
Sam Coe
7924878315
Fix git protocol and refactor Config interface ( #8246 )
2023-10-27 15:42:05 +02:00
Heath Stewart
7738b6187c
Add headers to all tables ( #8157 )
2023-10-20 11:20:02 +02:00
William Martin
6dc04bb1e2
Remove GetOrDefault uses in favour of GitProtocol
2023-10-19 12:57:19 +02:00
Sean Bright
6f99fd8442
Always show created gist privacy status. ( #7645 )
2023-07-06 06:22:50 +00:00
William Martin
491e9e8e58
Ensure gist edit request body matches desired schema ( #7635 )
...
* Ensure gist edit request body matches desired schema
* Immediately transform gist to gistToUpdate in edit flow
* Remove maps package and change to NewFilename
2023-07-03 13:33:49 +09:00
Kousik Mitra
baba894997
Add option to remove file from gist ( #7560 )
2023-06-23 14:08:21 +02:00
Kousik Mitra
895487127c
Remove unused linter flag
2023-06-05 22:54:35 +05:30
Kousik Mitra
31209bcf89
Replace SurveyAskOne with Prompter
2023-06-05 22:48:21 +05:30
Kousik Mitra
9ccd098eb0
Add gist selector option to gist edit command
2023-06-05 22:07:04 +05:30
Wing-Kam Wong
c6454064a4
refactor: revise errMsg in rename_test.go
2023-03-23 11:58:13 +08:00
Wing-Kam Wong
6854f0f63c
refactor: remove unnecessary validations
2023-03-23 11:58:00 +08:00
Wing-Kam Wong
951d1aaa1f
refactor: use ExactArgs instead of MaximumNArgs
2023-03-23 11:52:14 +08:00
Wing-Kam Wong
5699daef27
refactor: change from [] to {}
2023-03-23 11:51:55 +08:00
Wing-Kam Wong
3b27e068f2
feat: gist rename test
2023-03-22 00:11:40 +08:00
Wing-Kam Wong
b705ea94a0
fix: revise test cases in TestNewCmdRename in rename_test.go
2023-03-19 21:31:58 +08:00
Wing-Kam Wong
9e1d34f473
feat: add FlagErrorf for missing flag cases
2023-03-19 21:31:23 +08:00
Wing-Kam Wong
eb2da16b60
feat: TestNewCmdRename for gist rename
2023-03-19 19:43:34 +08:00
Wing-Kam Wong
daf4922176
refactor: remove unused code
2023-03-19 17:28:02 +08:00
Wing-Kam Wong
54de75db82
feat: add gist rename logic
2023-03-18 01:16:59 +08:00
Wing-Kam Wong
f9d3b71c3b
feat: add gistRenameCmd to gist.go
2023-03-17 22:35:37 +08:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods ( #7049 )
2023-02-28 00:24:45 +00:00
Mislav Marohnić
a55dd656f3
Merge remote-tracking branch 'origin' into cobra-update
2022-12-20 17:15:25 +01:00
Sam Coe
98ab1f2587
Authenticate network git commands ( #6541 )
2022-11-15 13:14:37 +02:00
Mislav Marohnić
b12ea845ef
Migrate to the new Cobra command grouping feature
2022-11-09 16:42:13 +01:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 ( #6474 )
2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression ( #6472 )
...
* Revert "Refactor to use new git client (#6447 )"
This reverts commit 57fbe4f317 .
* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client ( #6447 )
2022-10-19 21:11:36 +03:00
Mislav Marohnić
3fe5026d39
Migrate to tableprinter from go-gh ( #6346 )
2022-10-17 15:15:39 +02:00
Mislav Marohnić
27294c197f
gist clone: fix clone URL for GHE gists
...
Use `HOSTNAME/gist/ID` instead of `gist.HOSTNAME/ID` as clone URL for
Enterprise since it's not guaranteed that the `gist.` subdomain is
configured for a GHE instance.
2022-09-15 18:25:16 +02:00
Sam Coe
e7102f9d84
Migrate to go-gh text package ( #6236 )
2022-09-14 09:23:55 +04:00
Mark Woods
e876b22963
Change markdown wrap limit match terminal width ( #6016 )
2022-09-01 07:36:25 +00:00