Commit Graph

159 Commits

Author SHA1 Message Date
hedy 8b6fdba0e5
Fix typos 2022-03-27 14:20:12 +08:00
hedy 81d483a23a
Handle error when parsing relative URLs
And fix a typo
2022-03-27 13:50:10 +08:00
hedy e822d5ab07
Add some doc comments to mysteriously exported things 2022-03-27 13:31:12 +08:00
hedy de361f7d70
Add badges 2022-02-15 18:25:12 +08:00
hedy 83f903d887
Update readme 2022-02-15 13:42:09 +08:00
hedy f57468996c
Add Makefile, --version, and builds CI manifest
- installation and build through make
- with version and revision info with ldflags
  - version flag in gelim cli
- Updated readme to reflect new installation steps

- builds.sr.ht CI manifest for debian, fedora, and alpine that builds and tests
  the code
2022-02-15 13:41:42 +08:00
hedy a35b84da46
Add tests for response meta parser function 2022-02-15 12:06:19 +08:00
Hedy Li f26056caef
Update year in license
Happy new year, I guess
2022-01-09 21:31:02 +08:00
Hedy Li 7048709d27
Fix more typos 2022-01-09 21:28:17 +08:00
Hedy Li 9ba3f885c4
Fix typos 2022-01-08 21:44:57 +08:00
Hedy Li 9e6f22c196
Fix links line wrapping and color formatting
Comitting code that is more than a few months old, bare with me if my
description of these changes is far off from reality.

- Previously the ansi colors for link didn't apply when link lines were
  wrapped. Now it should work as long as you don't configure less opts
  to use -R instead of -r.
- Wrapping of link lines for single worded labels and those with a long
  url without a label should (somehow) work better now
- Added a custom (kinda lame) wrapping method in addition to ansiwrap to
  handle a special case, I think.
2022-01-08 21:35:23 +08:00
Hedy Li b84e6d6bd0
Refactor error-handling for line input 2022-01-01 21:54:48 +08:00
Hedy Li 419356b5cd
Remove empty string argument in fmt.Println 2022-01-01 21:49:37 +08:00
codesoap fede0a4a87
Do not show error message on exit through CTRL-D 2022-01-01 21:47:49 +08:00
Hedy Li 3bef3ee67c
Fix pre text display and add its style
Also fix h3 style to do sprint instead of sprintf and modify h1 style to
use hi magenta.
2021-10-04 09:21:36 +08:00
Hedy Li 66417553ec
README: Use inline code instead of code block in quickstart 2021-10-03 21:46:09 +08:00
Hedy Li 761462400a
README: Add name above each screenshot and add cmds screenshot 2021-10-03 21:39:52 +08:00
Hedy Li 93a65bd307
README: Don't use a table in screenshots 2021-10-03 21:33:28 +08:00
Hedy Li 966322a2c7
Add initial support for text wrap margins
config options added:
- leftmargin: percentage in decimal between 0 and 1 to pad on the left
  and right
- maxwidth:   max width for the page

I've also added h3style and fixed parsing of #, ##, and ###. Previously
I stupidly checked for # first, then ##, and this won't work as the line
starting with ## will also get into the # check. So obviously I now
parse ### first, then ##, and #.
2021-10-03 21:25:47 +08:00
Hedy Li a8121799b7
Fix text wrapping inconsistency 2021-10-03 20:26:59 +08:00
Hedy Li 39054c7fad
Handle empty or whitespace response header
Of course, all sorts of servers exist. But how did I not handle this
before? Worries me that there may a whole ton of other edge cases in
gelim unhandled. I should probabalynmake like a very crazy client
torture test for handling cases like this and make sure clients don't
crash.
2021-09-27 12:38:54 +08:00
Hedy Li f3889cdd2c
Fix description grammar in README
It was actually to trigger gpg password prompt so that in vimagit (for
some other repo) it won't prompt me for it. The prompt is very
unresponsive when called from magit not sure why.
2021-09-27 12:36:34 +08:00
Hedy Li 32e0168175
support editing a link in the current page 2021-09-10 15:06:56 +08:00
Hedy Li 6958cb79be
clean up files and resources before quitting 2021-09-10 14:51:40 +08:00
Hedy Li 9c780db24a
update readme 2021-09-02 10:59:07 +08:00
Hedy Li f9f991483c
readme: add more screenshots and add remote 2021-08-28 21:40:26 +08:00
Hedy Li 06e9669356
add command examples and support multiple indexes for `links` 2021-08-27 13:26:23 +08:00
Hedy Li b849ea9919
fix links command indexes 2021-08-27 13:08:23 +08:00
Hedy Li cafb379e04
fix index 0 and negative index behaviour 2021-08-26 11:04:05 +08:00
Hedy Li e01f29306b
add tour command, also add multiline help 2021-08-26 10:39:50 +08:00
Hedy Li 5cf687e408
cmd: support going to somthing in history and change placeholder syntax 2021-08-24 14:39:39 +08:00
Hedy Li 7cdffafae0
use magenta for h3 2021-08-24 13:30:27 +08:00
Hedy Li 98b8fef872
fix input cancelled or error messages 2021-08-24 13:28:57 +08:00
Hedy Li 9b3c8fa84a
Better colors and errors messages using display.go 2021-08-24 13:13:17 +08:00
Hedy Li 2c857b08b7
finally fix prompt options 2021-08-24 12:08:45 +08:00
Hedy Li 66106e14e4
Better error message if response header errored out 2021-08-13 12:53:06 +08:00
Hedy Li 9495f0883c
add github remote 2021-08-10 20:42:27 +08:00
Hedy Li d0c89d727d
fix prompts 2021-08-09 12:05:19 +08:00
Hedy Li 43cd5e1395
fix input loops 2021-08-09 11:30:07 +08:00
Hedy Li 0d7f7e060c
modify readme 2021-08-06 10:10:46 +08:00
Hedy Li 94b25076a5
fix prompt options 2021-08-02 15:03:05 +08:00
Hedy Li 116ea5970e
add todo 2021-07-30 15:18:20 +08:00
Hedy Li 1b5fd70778
format 2021-07-30 15:17:41 +08:00
Hedy Li 94736695a5
new command editurl 2021-07-30 15:17:33 +08:00
Hedy Li fda3ee8824
strip query part in prompt 2021-07-30 14:58:23 +08:00
Hedy Li db6d419ed1
add a lot of stuff to the readme 2021-07-30 13:33:03 +08:00
Hedy Li 035a2b6b61
feat: dynamic prompt based on url 2021-07-30 13:09:11 +08:00
Hedy Li a45b4d70fe
Merge branch 'liner' -- switch readline package
- improved experience
- tab completion and potentially editurl command
2021-07-30 11:38:50 +08:00
Hedy Li 29d86d998d
time to go fmt 2021-07-30 11:00:25 +08:00
Hedy Li da02653b3b
tab completion yay 2021-07-30 11:00:17 +08:00