Commit Graph

40 Commits

Author SHA1 Message Date
hedy 8d197dd6d9
Add clipboard command, better help message styles, refactor 2023-02-17 14:25:46 +08:00
hedy 09e780385e
Display: Use Style colors 2023-01-19 09:21:35 +08:00
hedy 6390c6f9b9
Fix terminal typing echo after quitting client
Fixes #3 (gh)

Before: Stuff typed into shell is not echoed (only restored after
`reset` or `stty sane`)
2022-03-30 10:41:06 +00:00
hedy 8b6fdba0e5
Fix typos 2022-03-27 14:20:12 +08:00
hedy e822d5ab07
Add some doc comments to mysteriously exported things 2022-03-27 13:31:12 +08:00
Hedy Li 7048709d27
Fix more typos 2022-01-09 21:28:17 +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 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 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 6958cb79be
clean up files and resources before quitting 2021-09-10 14:51:40 +08:00
Hedy Li e01f29306b
add tour command, also add multiline help 2021-08-26 10:39:50 +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 43cd5e1395
fix input loops 2021-08-09 11:30:07 +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 035a2b6b61
feat: dynamic prompt based on url 2021-07-30 13:09:11 +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
Hedy Li 6986439459
tui command line history and input history 2021-07-30 10:55:21 +08:00
Hedy Li b9f595bd09
switch to using liner 2021-07-29 14:39:32 +08:00
Hedy Li 7e06170bbd
fix extra newline 2021-07-28 09:46:44 +08:00
Hedy Li d4a04e160d
Add status code information 2021-07-20 20:44:49 +08:00
Hedy Li 110c657d7a
modify quote style 2021-07-19 16:34:56 +08:00
Hedy Li df578067fc
fix quote style 2021-07-19 10:26:09 +08:00
Hedy Li 022339b30b
config stuff 2021-07-16 14:52:23 +08:00
Hedy Li dd86c24dcf
append to history for spartan and remove resolved TODO comment 2021-07-15 11:53:05 +08:00
Hedy Li c5dbb9cd58
add a todo line 2021-07-14 20:39:05 +08:00
Hedy Li 453b6e1641
forgot to fmt 2021-07-14 20:18:10 +08:00
Hedy Li 4f900807d8
spartan protocol support
im not quite sure if there are bugs, they probably are a lot
2021-07-14 19:57:56 +08:00
Hedy Li fea92f8808
fix non-sensitive input 2021-07-14 12:38:16 +08:00
Hedy Li 107d10140c
go fmt 2021-07-14 12:29:27 +08:00
Hedy Li 11ef5bb90b
fix runtine error if cant connect to host 2021-07-14 12:29:20 +08:00
Hedy Li 5385e07605
better bullet list style 2021-07-14 12:27:24 +08:00
Hedy Li 65eee4f3e8
better link style 2021-07-14 12:22:45 +08:00
Hedy Li 5a12da8f69
better help and alias command 2021-07-14 10:55:04 +08:00
Hedy Li 81028ae9a8
a proper generated help for the interface 2021-07-13 15:10:44 +08:00
Hedy Li 2f27e0eef6
command struct 2021-07-13 13:30:21 +08:00
Hedy Li 03fe7b5b0b
MAJOR rewrite/refactor/revamp
now we have a client struct thingy that is the heart of gelim and does a
bunch of things. gemini.go is finally gemini specific

upcoming
1. command struct
2. spartan support
3. command aliases

also note that I haven't tested it deeply, I just it works, sorta
2021-07-13 12:30:06 +08:00