terminal user interface to jujutsu. Focused on speed and clarity
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

Document multi-select behaviour using space key

+21 -9
+7 -6
README.md
··· 1 1 # Jujutsu TUI 2 2 [![nix](https://github.com/faldor20/jj_tui/actions/workflows/build-nix.yml/badge.svg)](https://github.com/faldor20/jj_tui/actions/workflows/build-nix.yml) 3 - A TUI for the new version control system Jujutsu 3 + A TUI for the new version control system Jujutsu 4 4 5 5 6 6 ![jj_tui-ezgif com-optimize](https://github.com/faldor20/jj_tui/assets/26968035/fb053320-484a-4d6f-9b66-e5b9d0d49e5d) ··· 8 8 9 9 Press `?` to show the help. (commands are different between graph and files view). 10 10 Press `Arrows` to navigate windows, `Enter` to focus status view 11 + Press `Space` to select/deselect revisions (multi-select in graph view) 11 12 List of graph commands: 12 13 13 14 ![jj_tui commands](https://github.com/user-attachments/assets/1e446a3d-1736-4207-b311-29d8e4bdc333) 14 15 15 - Please provide any suggestions. I'm new to jujutsu so I'm sure people have workflows I couldn't even dream of. 16 + Please provide any suggestions. I'm new to jujutsu so I'm sure people have workflows I couldn't even dream of. 16 17 ## Installing 17 18 `linux`: Grab the latest release. It's statically linked and should work on any linux machine. 18 19 `mac`: Grab a prebuild. Let me know if you have any issues as I can't test on a mac. 19 20 20 - To open a shell with jj_tui on nix:`nix shell github:faldor20/jj_tui`` 21 + To open a shell with jj_tui on nix: `nix shell github:faldor20/jj_tui` 21 22 22 23 ## Dependencies 23 24 The jujutsu CLI (minimum version 0.30.0) 24 25 I haven't tested on windows or Mac. 25 - I believe it won't work outside Unix so Windows users will currently have to use wsl. 26 + I believe it won't work outside Unix so Windows users will currently have to use wsl. 26 27 27 28 28 29 # Config file: ··· 46 47 title: "Squash" 47 48 sub: 48 49 # sub menu command 49 - s: "squash_into_parent" 50 + s: "squash_into_parent" 50 51 # If the terminal is smaller than this width, the UI will change to a single pane view 51 52 single_pane_width_threshold: 110 52 53 ``` 53 54 For a full list of commands ids see [`jj_tui/bin/graph_commands.ml`](jj_tui/bin/graph_commands.ml) and [`jj_tui/bin/file_commands.ml`](jj_tui/bin/file_commands.ml) 54 55 55 - # logs: 56 + # logs: 56 57 `linux`: $XDG_STATE_HOME/jj_tui/ 57 58 `macos`: ~/Library/logs/jj_tui/ 58 59
+14 -3
jj_tui/bin/jj_commands.ml
··· 138 138 | Cmd_async _ ) 139 139 ; sort_key = _ 140 140 } -> 141 - [ render_command_line ~indent_level (key_to_string key) description ] 141 + let key_str = 142 + let s = key_to_string key in 143 + if s = " " then "<space>" else s 144 + in 145 + [ render_command_line ~indent_level key_str description ] 142 146 | { key; description; cmd = SubCmd subs; sort_key = _ } -> 143 - render_command_line ~indent_level (key_to_string key) description 147 + let key_str = 148 + let s = key_to_string key in 149 + if s = " " then "<space>" else s 150 + in 151 + render_command_line ~indent_level key_str description 144 152 :: render_commands ~indent_level:(indent_level + 1) subs 145 153 ;; 146 154 ··· 148 156 let move_command = 149 157 render_command_line ~indent_level:0 "Arrows" "navigation between windows" 150 158 in 151 - ((commands |> render_commands) @ if include_arrows then [ move_command ] else []) 159 + let space_command = 160 + render_command_line ~indent_level:0 "<space>" "toggle selection (multi-select)" 161 + in 162 + ((commands |> render_commands) @ if include_arrows then [ move_command; space_command ] else []) 152 163 |> I.vcat 153 164 |> Ui.atom 154 165 |> Lwd.pure