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.

check dry run before git push (on hold)

+30 -6
+28 -6
jj_tui/bin/graph_view.ml
··· 25 25 ; cmd = 26 26 Fun 27 27 (fun _ -> 28 - ui_state.show_popup $= Some (commands_list_ui ~include_arrows:true command_mapping, "Help"); 28 + ui_state.show_popup 29 + $= Some (commands_list_ui ~include_arrows:true command_mapping, "Help"); 29 30 ui_state.input $= `Mode (fun _ -> `Unhandled)) 30 31 } 31 32 ; { ··· 174 175 ; cmd = 175 176 SubCmd 176 177 [ 177 - { key = 'p'; description = "git push"; cmd = Cmd [ "git"; "push" ] } 178 + { 179 + key = 'p' 180 + ; description = "git push" 181 + ; cmd = 182 + Fun 183 + (fun _ -> 184 + let log = 185 + jj_no_log [ "git"; "push"; "--dry-run" ]^"hi\n" 186 + |> AnsiReverse.colored_string 187 + |> Ui.atom 188 + |> Lwd.pure 189 + in 190 + ui_state.show_popup $= Some (log, "Git push will:"); 191 + let subcmd = 192 + { 193 + key = 'y' 194 + ; description = "proceed" 195 + ; cmd = Cmd [ "git"; "push" ] 196 + } 197 + in 198 + ui_state.input $= `Mode (command_input ~is_sub:true [subcmd])) 199 + } 178 200 ; { key = 'f'; description = "git fetch"; cmd = Cmd [ "git"; "fetch" ] } 179 201 ] 180 202 } ··· 223 245 Cmd [ "branch"; "delete"; branch ] 224 246 |> confirm_prompt 225 247 (Printf.sprintf 226 - "delete the branch: '%s' This will also delete it on \ 227 - the remote next \"git push\"." 248 + "delete the branch: '%s' This will also delete it on the \ 249 + remote next \"git push\"." 228 250 branch)) 229 251 } 230 252 ; { ··· 238 260 Cmd [ "branch"; "forget"; branch ] 239 261 |> confirm_prompt 240 262 (Printf.sprintf 241 - "orget the branch: '%s' . This will not delete it on \ 242 - the remote." 263 + "orget the branch: '%s' . This will not delete it on the \ 264 + remote." 243 265 branch)) 244 266 } 245 267 ; {
+2
jj_tui/bin/jj_commands.ml
··· 262 262 let confirm_prompt prompt cmd = 263 263 SubCmd [ { key = 'y'; description = "Yes I want to " ^ prompt; cmd } ] 264 264 ;; 265 + (** Handles raw command mapping without regard for modes or the current intput state. Should be used when setting a new input mode*) 266 + let command_input=command_input;; 265 267 266 268 (** Handles input and sub_commands.*) 267 269 let handleInputs command_mapping =