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.

use y/n for git puth

+23 -7
+16 -6
jj_tui/bin/graph_view.ml
··· 28 28 |> ignore 29 29 ;; 30 30 31 - let rec make_command_mapping (key_map : Key_map.graph_keys) : 'acommand list = 31 + let rec make_command_mapping (key_map_base : Key_map.t) : 'acommand list = 32 + let key_map = key_map_base.graph in 32 33 [ 33 34 { 34 35 key = key_map.show_help ··· 259 260 let subcmds = 260 261 [ 261 262 { 262 - key = key_map.git.push 263 + key = key_map_base.confirm 263 264 ; description = "proceed" 264 - ; cmd = Cmd ([ "git"; "push"; "--allow-new" ] @ (revs|>List.concat_map(fun x-> ["-r";x]))) 265 + ; cmd = 266 + Cmd 267 + ([ "git"; "push"; "--allow-new" ] 268 + @ (revs |> List.concat_map (fun x -> [ "-r"; x ]))) 265 269 } 266 270 ; { 267 - key = key_map.git.fetch 271 + key = key_map_base.decline 268 272 ; description = "exit" 269 273 ; cmd = 270 274 Fun ··· 277 281 let log = 278 282 jj_no_log 279 283 ~get_stderr:true 280 - ([ "git"; "push"; "--allow-new"; "--dry-run"; ] @ (revs|>List.concat_map(fun x-> ["-r";x]))) 284 + ([ "git"; "push"; "--allow-new"; "--dry-run" ] 285 + @ (revs |> List.concat_map (fun x -> [ "-r"; x ]))) 281 286 |> AnsiReverse.colored_string 282 287 |> Ui.atom 283 288 |> Lwd.pure ··· 290 295 key = key_map.git.fetch 291 296 ; description = "git fetch" 292 297 ; cmd = Cmd [ "git"; "fetch" ] 298 + } 299 + ; { 300 + key = key_map.git.fetch_all 301 + ; description = "git fetch all remotes" 302 + ; cmd = Cmd [ "git"; "fetch"; "--all-remotes" ] 293 303 } 294 304 ] 295 305 } ··· 428 438 | Some mapping -> 429 439 mapping 430 440 | None -> 431 - let mapping = make_command_mapping (Lwd.peek ui_state.config).key_map.graph in 441 + let mapping = make_command_mapping (Lwd.peek ui_state.config).key_map in 432 442 command_mapping := Some mapping; 433 443 mapping 434 444 ;;
+1 -1
jj_tui/bin/jj_commands.ml
··· 316 316 317 317 (**`Prompt`:Allows running one command and then running another using the input of the first*) 318 318 let confirm_prompt prompt cmd = 319 - SubCmd [ { key = { key = 'y'; modifiers = [] }; description = "Yes I want to " ^ prompt; cmd } ] 319 + SubCmd [ {key=(Lwd.peek Vars.ui_state.config).key_map.confirm; description = "Yes I want to " ^ prompt; cmd } ] 320 320 ;; 321 321 322 322 (** Handles raw command mapping without regard for modes or the current intput state. Should be used when setting a new input mode*)
+6
jj_tui/lib/key_map.ml
··· 77 77 menu:key; 78 78 push : key; 79 79 fetch : key; 80 + fetch_all : key; 80 81 }[@@deriving yaml, record_updater ~derive: yaml] 81 82 82 83 type squash_keys = { ··· 140 141 }[@@deriving yaml, record_updater ~derive: yaml] 141 142 142 143 type t = { 144 + confirm:key; 145 + decline:key; 143 146 graph : graph_keys; [@updater] 144 147 file : file_keys;[@updater] 145 148 }[@@deriving yaml, record_updater ~derive: yaml] ··· 149 152 150 153 (* Default key bindings matching current implementation *) 151 154 let default:t = { 155 + confirm= simple_key 'y'; 156 + decline= simple_key 'n'; 152 157 graph = { 153 158 show_help = simple_key '?'; 154 159 prev = simple_key 'P'; ··· 191 196 menu = simple_key 'g'; 192 197 push = simple_key 'p'; 193 198 fetch = simple_key 'f'; 199 + fetch_all = simple_key 'F'; 194 200 }; 195 201 parallelize = simple_key 'z'; 196 202 abandon = simple_key 'a';