diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-17 20:01:16 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-30 18:35:23 +1000 |
commit | 18a508b29c82af6e2929860c93b69227ba4ed9c0 (patch) | |
tree | 022d17b989bca03ba5098d55469f5585276d5475 | |
parent | cdfad864ae337b9743a6f6ccc15fe1c088340f94 (diff) |
Update cheatsheets
-rw-r--r-- | docs/keybindings/Keybindings_en.md | 17 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_ja.md | 17 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_ko.md | 17 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_nl.md | 17 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_pl.md | 17 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_ru.md | 17 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_zh-CN.md | 17 | ||||
-rw-r--r-- | docs/keybindings/Keybindings_zh-TW.md | 17 | ||||
-rw-r--r-- | pkg/gui/controllers/worktrees_controller.go | 20 |
9 files changed, 146 insertions, 10 deletions
diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index 5e682be7e..2d8701483 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -89,6 +89,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>t</kbd>: Revert commit <kbd>T</kbd>: Tag commit <kbd><c-l></kbd>: Open log menu + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -154,6 +155,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>g</kbd>: View reset options <kbd>R</kbd>: Rename branch <kbd>u</kbd>: Set/Unset upstream + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View commits <kbd>/</kbd>: Filter the current view by text </pre> @@ -231,6 +233,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: Copy commit SHA to clipboard + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -254,6 +257,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: Delete branch <kbd>u</kbd>: Set as upstream of checked-out branch <kbd>g</kbd>: View reset options + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View commits <kbd>/</kbd>: Filter the current view by text </pre> @@ -276,6 +280,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: Drop <kbd>n</kbd>: New branch <kbd>r</kbd>: Rename stash + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View selected item's files <kbd>/</kbd>: Filter the current view by text </pre> @@ -294,6 +299,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: Copy commit SHA to clipboard + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -328,6 +334,17 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>P</kbd>: Push tag <kbd>n</kbd>: Create tag <kbd>g</kbd>: View reset options + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View commits <kbd>/</kbd>: Filter the current view by text </pre> + +## Worktrees + +<pre> + <kbd>n</kbd>: Create worktree + <kbd><space></kbd>: Switch to worktree + <kbd>o</kbd>: Open in editor + <kbd>d</kbd>: Remove worktree + <kbd>/</kbd>: Filter the current view by text +</pre> diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md index 787796679..ff41c92a2 100644 --- a/docs/keybindings/Keybindings_ja.md +++ b/docs/keybindings/Keybindings_ja.md @@ -52,6 +52,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: Drop <kbd>n</kbd>: 新しいブランチを作成 <kbd>r</kbd>: Stashを変更 + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View selected item's files <kbd>/</kbd>: Filter the current view by text </pre> @@ -60,6 +61,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: コミットのSHAをクリップボードにコピー + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: コミットをチェックアウト <kbd>y</kbd>: コミットの情報をコピー <kbd>o</kbd>: ブラウザでコミットを開く @@ -72,6 +74,16 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>/</kbd>: 検索を開始 </pre> +## Worktrees + +<pre> + <kbd>n</kbd>: Create worktree + <kbd><space></kbd>: Switch to worktree + <kbd>o</kbd>: Open in editor + <kbd>d</kbd>: Remove worktree + <kbd>/</kbd>: Filter the current view by text +</pre> + ## コミット <pre> @@ -95,6 +107,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>t</kbd>: コミットをrevert <kbd>T</kbd>: タグを作成 <kbd><c-l></kbd>: ログメニューを開く + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: コミットをチェックアウト <kbd>y</kbd>: コミットの情報をコピー <kbd>o</kbd>: ブラウザでコミットを開く @@ -160,6 +173,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>P</kbd>: タグをpush <kbd>n</kbd>: タグを作成 <kbd>g</kbd>: View reset options + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: コミットを閲覧 <kbd>/</kbd>: Filter the current view by text </pre> @@ -211,6 +225,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>g</kbd>: View reset options <kbd>R</kbd>: ブランチ名を変更 <kbd>u</kbd>: Set/Unset upstream + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: コミットを閲覧 <kbd>/</kbd>: Filter the current view by text </pre> @@ -305,6 +320,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: ブランチを削除 <kbd>u</kbd>: Set as upstream of checked-out branch <kbd>g</kbd>: View reset options + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: コミットを閲覧 <kbd>/</kbd>: Filter the current view by text </pre> @@ -313,6 +329,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: コミットのSHAをクリップボードにコピー + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: コミットをチェックアウト <kbd>y</kbd>: コミットの情報をコピー <kbd>o</kbd>: ブラウザでコミットを開く diff --git a/docs/keybindings/Keybindings_ko.md b/docs/keybindings/Keybindings_ko.md index 3ebe1f3ad..adafbe1e5 100644 --- a/docs/keybindings/Keybindings_ko.md +++ b/docs/keybindings/Keybindings_ko.md @@ -48,6 +48,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: 커밋 SHA를 클립보드에 복사 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 커밋을 체크아웃 <kbd>y</kbd>: 커밋 attribute 복사 <kbd>o</kbd>: 브라우저에서 커밋 열기 @@ -68,6 +69,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: Drop <kbd>n</kbd>: 새 브랜치 생성 <kbd>r</kbd>: Rename stash + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View selected item's files <kbd>/</kbd>: Filter the current view by text </pre> @@ -76,6 +78,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: 커밋 SHA를 클립보드에 복사 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 커밋을 체크아웃 <kbd>y</kbd>: 커밋 attribute 복사 <kbd>o</kbd>: 브라우저에서 커밋 열기 @@ -88,6 +91,16 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>/</kbd>: 검색 시작 </pre> +## Worktrees + +<pre> + <kbd>n</kbd>: Create worktree + <kbd><space></kbd>: Switch to worktree + <kbd>o</kbd>: Open in editor + <kbd>d</kbd>: Remove worktree + <kbd>/</kbd>: Filter the current view by text +</pre> + ## 메뉴 <pre> @@ -177,6 +190,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>g</kbd>: View reset options <kbd>R</kbd>: 브랜치 이름 변경 <kbd>u</kbd>: Set/Unset upstream + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 커밋 보기 <kbd>/</kbd>: Filter the current view by text </pre> @@ -226,6 +240,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: 브랜치 삭제 <kbd>u</kbd>: Set as upstream of checked-out branch <kbd>g</kbd>: View reset options + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 커밋 보기 <kbd>/</kbd>: Filter the current view by text </pre> @@ -253,6 +268,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>t</kbd>: 커밋 되돌리기 <kbd>T</kbd>: Tag commit <kbd><c-l></kbd>: 로그 메뉴 열기 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 커밋을 체크아웃 <kbd>y</kbd>: 커밋 attribute 복사 <kbd>o</kbd>: 브라우저에서 커밋 열기 @@ -294,6 +310,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>P</kbd>: 태그를 push <kbd>n</kbd>: 태그를 생성 <kbd>g</kbd>: View reset options + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 커밋 보기 <kbd>/</kbd>: Filter the current view by text </pre> diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index feae84761..e63fde865 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -98,6 +98,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>g</kbd>: Bekijk reset opties <kbd>R</kbd>: Hernoem branch <kbd>u</kbd>: Set/Unset upstream + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Bekijk commits <kbd>/</kbd>: Filter the current view by text </pre> @@ -147,6 +148,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>t</kbd>: Commit ongedaan maken <kbd>T</kbd>: Tag commit <kbd><c-l></kbd>: Open log menu + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -209,6 +211,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: Kopieer commit SHA naar klembord + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -232,6 +235,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: Verwijder branch <kbd>u</kbd>: Stel in als upstream van uitgecheckte branch <kbd>g</kbd>: Bekijk reset opties + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Bekijk commits <kbd>/</kbd>: Filter the current view by text </pre> @@ -276,6 +280,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: Laten vallen <kbd>n</kbd>: Nieuwe branch <kbd>r</kbd>: Rename stash + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Bekijk gecommite bestanden <kbd>/</kbd>: Filter the current view by text </pre> @@ -294,6 +299,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: Kopieer commit SHA naar klembord + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -328,6 +334,17 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>P</kbd>: Push tag <kbd>n</kbd>: Creëer tag <kbd>g</kbd>: Bekijk reset opties + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Bekijk commits <kbd>/</kbd>: Filter the current view by text </pre> + +## Worktrees + +<pre> + <kbd>n</kbd>: Create worktree + <kbd><space></kbd>: Switch to worktree + <kbd>o</kbd>: Open in editor + <kbd>d</kbd>: Remove worktree + <kbd>/</kbd>: Filter the current view by text +</pre> diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index c619bfff8..ce666dd0a 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -74,6 +74,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>t</kbd>: Odwróć commit <kbd>T</kbd>: Tag commit <kbd><c-l></kbd>: Open log menu + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -112,6 +113,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>g</kbd>: Wyświetl opcje resetu <kbd>R</kbd>: Rename branch <kbd>u</kbd>: Set/Unset upstream + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View commits <kbd>/</kbd>: Filter the current view by text </pre> @@ -208,6 +210,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: Copy commit SHA to clipboard + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -231,6 +234,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: Usuń gałąź <kbd>u</kbd>: Set as upstream of checked-out branch <kbd>g</kbd>: Wyświetl opcje resetu + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View commits <kbd>/</kbd>: Filter the current view by text </pre> @@ -269,6 +273,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: Porzuć <kbd>n</kbd>: Nowa gałąź <kbd>r</kbd>: Rename stash + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Przeglądaj pliki commita <kbd>/</kbd>: Filter the current view by text </pre> @@ -287,6 +292,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: Copy commit SHA to clipboard + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Checkout commit <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: Open commit in browser @@ -321,10 +327,21 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>P</kbd>: Push tag <kbd>n</kbd>: Create tag <kbd>g</kbd>: Wyświetl opcje resetu + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: View commits <kbd>/</kbd>: Filter the current view by text </pre> +## Worktrees + +<pre> + <kbd>n</kbd>: Create worktree + <kbd><space></kbd>: Switch to worktree + <kbd>o</kbd>: Open in editor + <kbd>d</kbd>: Remove worktree + <kbd>/</kbd>: Filter the current view by text +</pre> + ## Zwykłe <pre> diff --git a/docs/keybindings/Keybindings_ru.md b/docs/keybindings/Keybindings_ru.md index cfd05fec8..8da16f7f6 100644 --- a/docs/keybindings/Keybindings_ru.md +++ b/docs/keybindings/Keybindings_ru.md @@ -44,6 +44,16 @@ _Связки клавиш_ <kbd>[</kbd>: Предыдущая вкладка </pre> +## Worktrees + +<pre> + <kbd>n</kbd>: Create worktree + <kbd><space></kbd>: Switch to worktree + <kbd>o</kbd>: Open in editor + <kbd>d</kbd>: Remove worktree + <kbd>/</kbd>: Filter the current view by text +</pre> + ## Главная панель (Индексирование) <pre> @@ -109,6 +119,7 @@ _Связки клавиш_ <pre> <kbd><c-o></kbd>: Скопировать SHA коммита в буфер обмена + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Переключить коммит <kbd>y</kbd>: Скопировать атрибут коммита <kbd>o</kbd>: Открыть коммит в браузере @@ -144,6 +155,7 @@ _Связки клавиш_ <kbd>t</kbd>: Отменить коммит <kbd>T</kbd>: Пометить коммит тегом <kbd><c-l></kbd>: Открыть меню журнала + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Переключить коммит <kbd>y</kbd>: Скопировать атрибут коммита <kbd>o</kbd>: Открыть коммит в браузере @@ -175,6 +187,7 @@ _Связки клавиш_ <kbd>g</kbd>: Просмотреть параметры сброса <kbd>R</kbd>: Переименовать ветку <kbd>u</kbd>: Установить/убрать upstream-ветку + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Просмотреть коммиты <kbd>/</kbd>: Filter the current view by text </pre> @@ -198,6 +211,7 @@ _Связки клавиш_ <pre> <kbd><c-o></kbd>: Скопировать SHA коммита в буфер обмена + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: Переключить коммит <kbd>y</kbd>: Скопировать атрибут коммита <kbd>o</kbd>: Открыть коммит в браузере @@ -264,6 +278,7 @@ _Связки клавиш_ <kbd>P</kbd>: Отправить тег <kbd>n</kbd>: Создать тег <kbd>g</kbd>: Просмотреть параметры сброса + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Просмотреть коммиты <kbd>/</kbd>: Filter the current view by text </pre> @@ -279,6 +294,7 @@ _Связки клавиш_ <kbd>d</kbd>: Удалить ветку <kbd>u</kbd>: Установить как upstream-ветку переключённую ветку <kbd>g</kbd>: Просмотреть параметры сброса + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Просмотреть коммиты <kbd>/</kbd>: Filter the current view by text </pre> @@ -328,6 +344,7 @@ _Связки клавиш_ <kbd>d</kbd>: Удалить припрятанные изменения из хранилища <kbd>n</kbd>: Новая ветка <kbd>r</kbd>: Переименовать хранилище + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: Просмотреть файлы выбранного элемента <kbd>/</kbd>: Filter the current view by text </pre> diff --git a/docs/keybindings/Keybindings_zh-CN.md b/docs/keybindings/Keybindings_zh-CN.md index 3274b1a0c..0bb8336cf 100644 --- a/docs/keybindings/Keybindings_zh-CN.md +++ b/docs/keybindings/Keybindings_zh-CN.md @@ -48,6 +48,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: 将提交的 SHA 复制到剪贴板 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 检出提交 <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: 在浏览器中打开提交 @@ -60,6 +61,16 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>/</kbd>: Filter the current view by text </pre> +## Worktrees + +<pre> + <kbd>n</kbd>: Create worktree + <kbd><space></kbd>: Switch to worktree + <kbd>o</kbd>: Open in editor + <kbd>d</kbd>: Remove worktree + <kbd>/</kbd>: Filter the current view by text +</pre> + ## 分支页面 <pre> @@ -80,6 +91,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>g</kbd>: 查看重置选项 <kbd>R</kbd>: 重命名分支 <kbd>u</kbd>: Set/Unset upstream + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 查看提交 <kbd>/</kbd>: Filter the current view by text </pre> @@ -88,6 +100,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <pre> <kbd><c-o></kbd>: 将提交的 SHA 复制到剪贴板 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 检出提交 <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: 在浏览器中打开提交 @@ -137,6 +150,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>t</kbd>: 还原提交 <kbd>T</kbd>: 标签提交 <kbd><c-l></kbd>: 打开日志菜单 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 检出提交 <kbd>y</kbd>: Copy commit attribute <kbd>o</kbd>: 在浏览器中打开提交 @@ -221,6 +235,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>P</kbd>: 推送标签 <kbd>n</kbd>: 创建标签 <kbd>g</kbd>: 查看重置选项 + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 查看提交 <kbd>/</kbd>: Filter the current view by text </pre> @@ -303,6 +318,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: 删除 <kbd>n</kbd>: 新分支 <kbd>r</kbd>: Rename stash + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 查看提交的文件 <kbd>/</kbd>: Filter the current view by text </pre> @@ -318,6 +334,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_ <kbd>d</kbd>: 删除分支 <kbd>u</kbd>: 设置为检出分支的上游 <kbd>g</kbd>: 查看重置选项 + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 查看提交 <kbd>/</kbd>: Filter the current view by text </pre> diff --git a/docs/keybindings/Keybindings_zh-TW.md b/docs/keybindings/Keybindings_zh-TW.md index 68859a23d..75a36ccbe 100644 --- a/docs/keybindings/Keybindings_zh-TW.md +++ b/docs/keybindings/Keybindings_zh-TW.md @@ -48,6 +48,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B_ <pre> <kbd><c-o></kbd>: 複製提交 SHA 到剪貼簿 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 檢出提交 <kbd>y</kbd>: 複製提交屬性 <kbd>o</kbd>: 在瀏覽器中開啟提交 @@ -60,6 +61,16 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B_ <kbd>/</kbd>: Filter the current view by text </pre> +## Worktrees + +<pre> + <kbd>n</kbd>: Create worktree + <kbd><space></kbd>: Switch to worktree + <kbd>o</kbd>: Open in editor + <kbd>d</kbd>: Remove worktree + <kbd>/</kbd>: Filter the current view by text +</pre> + ## 主視窗 (一般) <pre> @@ -133,6 +144,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B_ <pre> <kbd><c-o></kbd>: 複製提交 SHA 到剪貼簿 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 檢出提交 <kbd>y</kbd>: 複製提交屬性 <kbd>o</kbd>: 在瀏覽器中開啟提交 @@ -182,6 +194,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B_ <kbd>t</kbd>: 還原提交 <kbd>T</kbd>: 打標籤到提交 <kbd><c-l></kbd>: 開啟記錄選單 + <kbd>w</kbd>: View worktree options <kbd><space></kbd>: 檢出提交 <kbd>y</kbd>: 複製提交屬性 <kbd>o</kbd>: 在瀏覽器中開啟提交 @@ -223,6 +236,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B_ <kbd>d</kbd>: 捨棄 <kbd>n</kbd>: 新分支 <kbd>r</kbd>: 重新命名收藏 + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 檢視所選項目的檔案 <kbd>/</kbd>: Filter the current view by text </pre> @@ -247,6 +261,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B_ <kbd>g</kbd>: 檢視重設選項 <kbd>R</kbd>: 重新命名分支 <kbd>u</kbd>: 設定/取消設定上游 + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 檢視提交 <kbd>/</kbd>: Filter the current view by text </pre> @@ -259,6 +274,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B_ <kbd>P</kbd>: 推送標籤 <kbd>n</kbd>: 建立標籤 <kbd>g</kbd>: 檢視重設選項 + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 檢視提交 <kbd>/</kbd>: Filter the current view by text </pre> @@ -328,6 +344,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B_ <kbd>d</kbd>: 刪除分支 <kbd>u</kbd>: 將此分支設為當前分支之上游 <kbd>g</kbd>: 檢視重設選項 + <kbd>w</kbd>: View worktree options <kbd><enter></kbd>: 檢視提交 <kbd>/</kbd>: Filter the current view by text </pre> diff --git a/pkg/gui/controllers/worktrees_controller.go b/pkg/gui/controllers/worktrees_controller.go index c38a679da..3a051e719 100644 --- a/pkg/gui/controllers/worktrees_controller.go +++ b/pkg/gui/controllers/worktrees_controller.go @@ -30,25 +30,25 @@ func NewWorktreesController( func (self *WorktreesController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding { bindings := []*types.Binding{ { - Key: opts.GetKey(opts.Config.Universal.Select), - Handler: self.checkSelected(self.enter), - Description: self.c.Tr.SwitchToWorktree, - }, - { - Key: opts.GetKey(opts.Config.Universal.Remove), - Handler: self.checkSelected(self.remove), - Description: self.c.Tr.RemoveWorktree, - }, - { Key: opts.GetKey(opts.Config.Universal.New), Handler: self.add, Description: self.c.Tr.CreateWorktree, }, { + Key: opts.GetKey(opts.Config.Universal.Select), + Handler: self.checkSelected(self.enter), + Description: self.c.Tr.SwitchToWorktree, + }, + { Key: opts.GetKey(opts.Config.Universal.OpenFile), Handler: self.checkSelected(self.open), Description: self.c.Tr.OpenInEditor, }, + { + Key: opts.GetKey(opts.Config.Universal.Remove), + Handler: self.checkSelected(self.remove), + Description: self.c.Tr.RemoveWorktree, + }, } return bindings |