~adnano/astronaut

977297ba9395aa3bf738fa3bd7c84993af29fc85 — Adnan Maolood 2 years ago 87208dd
doc: Document follow mode
2 files changed, 24 insertions(+), 3 deletions(-)

M command.go
M doc/astronaut.1.scd
M command.go => command.go +3 -3
@@ 20,6 20,9 @@ var commands = map[string]Command{
		b.input.SetInput(prompt)
		return nil
	},
	"follow": func(b *Browser, args ...string) error {
		return b.FollowMode()
	},
	"open": func(b *Browser, args ...string) error {
		if len(args) == 0 {
			return errors.New("usage: open <url>")


@@ 169,7 172,4 @@ var commands = map[string]Command{
		b.tabs[b.tab].DoBackground(&gemini.Request{URL: u})
		return nil
	},
	"follow": func(b *Browser, args ...string) error {
		return b.FollowMode()
	},
}

M doc/astronaut.1.scd => doc/astronaut.1.scd +21 -0
@@ 22,6 22,10 @@ The following commands are supported:
	populated with the command and the user will be able to edit it before
	execution.

*follow*
	Enters follow mode. Visible links will be assigned a unique label, and
	can be focused by typing the label.

*open* <url>
	Opens the given URL. If the scheme is ommitted, a scheme of "gemini" is
	assumed.


@@ 143,6 147,23 @@ The following directives are supported:
	}
	```

*follow*
	Configures the behavior of follow mode.

	The following child directives are supported:

	*letters* <chars>
		Configures the characters used to generate link labels. Must contain at
		least two characters.

	Example:

	```
	follow {
		letters asdfjkl
	}
	```

*bind* <key> <command...>
	Binds the key sequence to the given command. Currently only one key can be
	bound to a command.