Skip to content

Commit

Permalink
docs: add a tip to cd back to the root of the current Git repository
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Sep 9, 2024
1 parent ec524e1 commit 143458a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ del "%tmpfile%"
</TabItem>
</Tabs>
To use it, copy the function into the configuration file of your respective shell. Then use `y` instead of `yazi` to start.
To use it, copy the function into the configuration file of your respective shell.
Then use `y` instead of `yazi` to start, and press <kbd>q</kbd> to quit, you'll see the CWD changed. Sometimes, you don't want to change, press <kbd>Q</kbd> to quit.
## Keybindings
Expand Down
12 changes: 12 additions & 0 deletions docs/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,18 @@ run = [ '''
''', "yank" ]
```

## `cd` back to the root of the current Git repository {#cd-to-git-root}

```toml
[[manager.prepend_keymap]]
on = [ "g", "r" ]
run = '''
shell 'ya pub dds-cd --str "$(git rev-parse --show-toplevel)"' --confirm
'''
```

Credits to [@aidanzhai for sharing it](https://t.me/yazi_rs/3325/15373) in Yazi's telegram group.

## Maximize preview pane {#max-preview}

Moved to https://github.com/yazi-rs/plugins/tree/main/max-preview.yazi
Expand Down

0 comments on commit 143458a

Please sign in to comment.