Skip to content

Commit

Permalink
Merge pull request #9 from Natanel-Shitrit/patch-1
Browse files Browse the repository at this point in the history
fix: docs broken link
  • Loading branch information
cfoust authored Jul 20, 2024
2 parents c96e0a1 + a7712de commit e8f64c8
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Features:

- [Replay and search through](./replay-mode.md) any terminal session
- [Flexible configuration](./configuration.md) with [Janet](https://janet-lang.org/), a simple imperative programming language
- Built-in [fuzzy finding](./fuzzy-finding.md) using concepts from [fzf](https://github.com/junegunn/fzf)
- Built-in [fuzzy finding](./user-input/fuzzy-finding.md) using concepts from [fzf](https://github.com/junegunn/fzf)
4 changes: 2 additions & 2 deletions docs/src/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Multiplexing, of course, is where things get interesting. `cy`'s codebase has a
- `mux`: A few useful abstractions for multiplexing.
- `janet`: A library for Janet/Go interoperation.
- `emu`: A vt100 terminal emulator.
- `fuzzy`: A [fuzzy finder](./fuzzy-finding.md).
- `fuzzy`: A [fuzzy finder](./user-input/fuzzy-finding.md).
- `replay`: A terminal session player, otherwise known as [replay mode](./replay-mode.md).
- `taro`: A fork of [charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) adapted for use in `cy`'s windowing abstraction (described [below](./architecture.md#screens-and-streams).)
- `docs`: Contains all of `cy`'s documentation. `cy` uses [mdbook](https://github.com/rust-lang/mdBook) to build the documentation site.
Expand Down Expand Up @@ -114,7 +114,7 @@ type Screen interface {

The easiest way to understand this is to think of a `Screen` as something that can render a `Stream` and turn it into something that can be composed with other `Screen`s. In fact, there is a `Screen` that [does just that](https://github.com/cfoust/cy/blob/main/pkg/mux/screen/terminal.go?plain=1#L13).

`cy`'s [fuzzy finder](./fuzzy-finding.md) and [replay mode](./replay-mode.md) are both just `Screen`s, albeit complicated ones.
`cy`'s [fuzzy finder](./user-input/fuzzy-finding.md) and [replay mode](./replay-mode.md) are both just `Screen`s, albeit complicated ones.

Some `Screen`s just exist to compose other screens in some way, which is the bread and butter of any terminal multiplexer.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/groups-and-panes.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For example:
(group/mkdir :root "/some/other/group")
```

The {{api group/mkdir}} function creates a group at the provided path (if it does not already exist) and returns its [NodeID](/api.md#nodeid).
The {{api group/mkdir}} function creates a group at the provided path (if it does not already exist) and returns its [NodeID](./api.md#nodeid).

## The node tree

Expand Down
2 changes: 1 addition & 1 deletion docs/src/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Parameters are set with {{api param/set}} and retrieved with {{api param/get}}:

Parameters work just like bindings do in the [node tree](./groups-and-panes.md#the-node-tree) in that the parameter values in descendant nodes overrite those in their ancestors when a client is attached to them. This allows `cy`'s functionality to be configured on a per-group (or even per-pane) basis using **default parameters**, which are described below.

`cy`'s settings are known as **default parameters**. They are set and retrieved in the same way normal parameters are, but influence `cy`'s behavior in ways not directly controllable using the API. A complete list can be found in [the default parameters chapter](/default-parameters.md).
`cy`'s settings are known as **default parameters**. They are set and retrieved in the same way normal parameters are, but influence `cy`'s behavior in ways not directly controllable using the API. A complete list can be found in [the default parameters chapter](./default-parameters.md).
2 changes: 1 addition & 1 deletion docs/src/quick-start/new-shells.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To create a new shell, type {{bind :root ctrl+a j}}. This creates a new pane run

Every **group** and **pane** in `cy` has a path, just like a file in a filesystem. The new shell you created has a path like `/shells/3`.

The collection of all **groups** and **panes** is referred to as [**the node tree**](/groups-and-panes.md). When you first start `cy`, the node tree looks like this:
The collection of all **groups** and **panes** is referred to as [**the node tree**](../groups-and-panes.md). When you first start `cy`, the node tree looks like this:

```
/ (group)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/quick-start/replay-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{story cast cy/replay}}

`cy`'s records all of your terminal sessions in their entirety and lets you explore them at will in an interface called **replay mode**. [Replay mode](/replay-mode.md) is conceptually similar to `tmux`'s `copy-mode`, but also gives you access to time controls.
`cy`'s records all of your terminal sessions in their entirety and lets you explore them at will in an interface called **replay mode**. [Replay mode](../replay-mode.md) is conceptually similar to `tmux`'s `copy-mode`, but also gives you access to time controls.

You open replay mode for a given pane by typing {{bind :root ctrl+a p}}. You can also scroll up with the mouse if the pane's content is scrollable (such as when using a shell.)

Expand All @@ -12,5 +12,5 @@ Replay mode is powerful, but for basic usage you can use the following keys:
* Go to the beginning of the recording with {{bind :time g g}} and the end with {{bind :time G}}
* Quit with {{bind :time ctrl+c}}

For more information, refer to [the chapter dedicated to replay mode](/replay-mode.md) and [the list of all of its key bindings](/default-keys.md#replay-mode).
For more information, refer to [the chapter dedicated to replay mode](../replay-mode.md) and [the list of all of its key bindings](../default-keys.md#replay-mode).

2 changes: 1 addition & 1 deletion docs/src/replay-mode/modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Some examples:

### Copy mode

To enter copy mode, all you need to do is invoke any action that would cause the cursor or the viewport to move. Like `tmux`'s copy mode, you can explore the state of the screen and copy text to be pasted elsewhere. Copy mode supports a wide range of cursor and viewport movements that should feel familiar to users of CLI text editors such as `vim`. For a full list of supported motions, refer to the [reference page for key bindings](/default-keys.md#movements).
To enter copy mode, all you need to do is invoke any action that would cause the cursor or the viewport to move. Like `tmux`'s copy mode, you can explore the state of the screen and copy text to be pasted elsewhere. Copy mode supports a wide range of cursor and viewport movements that should feel familiar to users of CLI text editors such as `vim`. For a full list of supported motions, refer to the [reference page for key bindings](../default-keys.md#movements).

Copy mode also allows you to swap between the terminal's main and alt screens using {{bind :copy s}}. In other words, even if you run a full-screen application such as `htop`, you can still swap back to the scrollback buffer and see the output of commands you ran before running `htop`.

Expand Down
6 changes: 3 additions & 3 deletions docs/src/user-input/fuzzy-finding.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{story cast input/find/full-bottom}}

Simple, fast, and configurable fuzzy finding is one of `cy`'s most important features. `cy` provides a purpose-built fuzzy finder (similar to [fzf](https://github.com/junegunn/fzf)) in the form of {{api input/find}}, which is a function available in [the API](./api.md#inputfind).
Simple, fast, and configurable fuzzy finding is one of `cy`'s most important features. `cy` provides a purpose-built fuzzy finder (similar to [fzf](https://github.com/junegunn/fzf)) in the form of {{api input/find}}, which is a function available in [the API](../api.md#inputfind).

## Choosing a string from a list

Expand All @@ -12,7 +12,7 @@ In its simplest form, {{api input/find}} takes a single parameter: a [Janet arra
(input/find @["one" "two" "three"])
```

By default, the background will be animated with one of `cy`'s [animations](./animations.md). If the user does not choose anything, this function returns `nil`; if they do, it will return the option that they chose.
By default, the background will be animated with one of `cy`'s [animations](../animations.md). If the user does not choose anything, this function returns `nil`; if they do, it will return the option that they chose.

## Choosing an arbitrary value from a list

Expand Down Expand Up @@ -53,7 +53,7 @@ It is sometimes handy to be able to have the user choose from a row in a table r

Where {{api input/find}} really shines, however, is in its ability to show a preview window for each option, which is conceptually similar to `fzf`'s `--preview` command line flag. {{api input/find}} can preview three different types of content:

- **Panes:** Show the current state of a pane in `cy`'s [node tree](./groups-and-panes.md#the-node-tree). This is the live view of a pane, regardless of how many other clients are interacting with it or what is happening on the screen.
- **Panes:** Show the current state of a pane in `cy`'s [node tree](../groups-and-panes.md#the-node-tree). This is the live view of a pane, regardless of how many other clients are interacting with it or what is happening on the screen.
- **`.borg` files:** Show a moment in time in a `.borg` file.
- **Scrollback buffer:** Show the output of a particular command in a pane's scrollback buffer.
- **Text:** Render some text.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/viewport.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ For the time being, `cy` only allows each user to view and interact with one pan
(viewport/set-size [20 20])
```

The patterned background seen in the screenshot above is referred to as the **frame**. `cy` comes with a [range of different frames](/frames.md). You can choose between all of the available frames using the {{api action/choose-frame}} function, which is bound by default to {{bind :root ctrl+a F}}, and set the default frame on startup using the [`:default-frame`](/default-parameters.md#default-frame) parameter.
The patterned background seen in the screenshot above is referred to as the **frame**. `cy` comes with a [range of different frames](./frames.md). You can choose between all of the available frames using the {{api action/choose-frame}} function, which is bound by default to {{bind :root ctrl+a F}}, and set the default frame on startup using the [`:default-frame`](./default-parameters.md#default-frame) parameter.
2 changes: 1 addition & 1 deletion docs/src/why-not-tmux.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To some, this may seem like a surprising decision. The predominant abstraction f

Yet I found that I have spent more time fighting with this (or writing [plugins to remove it](https://github.com/cfoust/tmux-oakthree)) than benefiting from it. Rarely do I feel like I need to see more than one pane at a time.

This is practical because `cy` makes it easy to switch between panes. It emphasizes using [fuzzy finding](./fuzzy-finding.md) (with previews!) so you can quickly find what you're looking for. It also contains a minimal, [filesystem-like abstraction](./groups-and-panes.md) for grouping panes together.
This is practical because `cy` makes it easy to switch between panes. It emphasizes using [fuzzy finding](./user-input/fuzzy-finding.md) (with previews!) so you can quickly find what you're looking for. It also contains a minimal, [filesystem-like abstraction](./groups-and-panes.md) for grouping panes together.

As of writing, `cy` also lacks `tmux`'s status line. Because there is no notion of windows, there is nothing akin to the tab-like behavior that `tmux` encourages (and thus little immediate need to display it.)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cy/api/docs-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

`(input/find)` is a general-purpose fuzzy finder that is similar to `fzf`. When invoked, it prompts the user to choose from one of the items provided in `inputs`. `(input/find)` does not return until the user makes a choice; if they choose nothing (such as by hitting <kbd>ctrl+c</kbd>), it returns `nil`.

`inputs` is an array with elements that can take different forms depending on the desired behavior. See more on the [page about fuzzy finding](./fuzzy-finding.md).
`inputs` is an array with elements that can take different forms depending on the desired behavior. See more on the [page about fuzzy finding](./user-input/fuzzy-finding.md).

This function supports a range of named parameters that adjust its functionality:

Expand Down

0 comments on commit e8f64c8

Please sign in to comment.