diff --git a/README.md b/README.md index ecc1a84..8dbf89b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ that in the ["Why?" section](#why)). See contributing guidelines [here](CONTRIBUTING.md). +![demo](doc/demo.gif) + ## How it works? When you run the `fix` command, it gets the last command from the shell history. @@ -106,7 +108,7 @@ CPU cores. ### On "instant mode" -The Fuck has a feature called "insant mode" where it wraps around your shell to +The Fuck has a feature called "instant mode" where it wraps around your shell to log output and read it instead of re-running the previous command. While this approach is certainly useful and has the benefit of being available on every terminal emulator locally, over SSH remotely, and without any additional diff --git a/doc/demo.cast b/doc/demo.cast new file mode 100644 index 0000000..8d6cd9e --- /dev/null +++ b/doc/demo.cast @@ -0,0 +1,109 @@ +{"version": 2, "width": 80, "height": 24, "timestamp": 1718141369, "env": {"SHELL": "/opt/homebrew/bin/fish", "TERM": "xterm-256color"}} +[0.02887, "o", "\u001b]4;1;rgb:cc/24/1d\u0007"] +[0.030005, "o", "\u001b]4;2;rgb:98/97/1a\u0007"] +[0.031148, "o", "\u001b]4;3;rgb:d7/99/21\u0007"] +[0.032179, "o", "\u001b]4;4;rgb:45/85/88\u0007"] +[0.033379, "o", "\u001b]4;5;rgb:b1/62/86\u0007"] +[0.03451, "o", "\u001b]4;6;rgb:68/9d/6a\u0007"] +[0.035677, "o", "\u001b]11;rgb:28/28/28\u0007"] +[0.036841, "o", "\u001b]10;rgb:eb/db/b2\u0007"] +[0.038246, "o", "\u001b]4;0;rgb:28/28/28\u0007"] +[0.039399, "o", "\u001b]4;7;rgb:a8/99/84\u0007"] +[0.040389, "o", "\u001b]4;8;rgb:92/83/74\u0007"] +[0.041476, "o", "\u001b]4;9;rgb:fb/59/34\u0007"] +[0.042498, "o", "\u001b]4;10;rgb:b8/bb/26\u0007"] +[0.043412, "o", "\u001b]4;11;rgb:fa/bd/2f\u0007"] +[0.044743, "o", "\u001b]4;12;rgb:83/a5/98\u0007"] +[0.046126, "o", "\u001b]4;13;rgb:d3/86/9b\u0007"] +[0.047451, "o", "\u001b]4;14;rgb:8e/c0/7c\u0007"] +[0.048531, "o", "\u001b]4;15;rgb:eb/db/b2\u0007"] +[0.04958, "o", "\u001b]4;236;rgb:32/30/2f\u0007"] +[0.050674, "o", "\u001b]4;234;rgb:1d/20/21\u0007"] +[0.051829, "o", "\u001b]4;235;rgb:28/28/28\u0007"] +[0.052977, "o", "\u001b]4;237;rgb:3c/38/36\u0007"] +[0.053971, "o", "\u001b]4;239;rgb:50/49/45\u0007"] +[0.055039, "o", "\u001b]4;241;rgb:66/5c/54\u0007"] +[0.056098, "o", "\u001b]4;243;rgb:7c/6f/64\u0007"] +[0.057114, "o", "\u001b]4;244;rgb:92/83/74\u0007"] +[0.058076, "o", "\u001b]4;245;rgb:92/83/74\u0007"] +[0.059122, "o", "\u001b]4;228;rgb:f2/e5/bc\u0007"] +[0.060311, "o", "\u001b]4;230;rgb:f9/f5/d7\u0007"] +[0.061529, "o", "\u001b]4;229;rgb:fb/f1/c7\u0007"] +[0.062602, "o", "\u001b]4;223;rgb:eb/db/b2\u0007"] +[0.063631, "o", "\u001b]4;250;rgb:d5/c4/a1\u0007"] +[0.06467, "o", "\u001b]4;248;rgb:bd/ae/93\u0007"] +[0.065627, "o", "\u001b]4;246;rgb:a8/99/84\u0007"] +[0.066534, "o", "\u001b]4;167;rgb:fb/49/34\u0007"] +[0.067514, "o", "\u001b]4;142;rgb:b8/bb/26\u0007"] +[0.068426, "o", "\u001b]4;214;rgb:fa/bd/2f\u0007"] +[0.069283, "o", "\u001b]4;109;rgb:83/a5/98\u0007"] +[0.070122, "o", "\u001b]4;175;rgb:d3/86/9b\u0007"] +[0.071017, "o", "\u001b]4;108;rgb:8e/c0/7c\u0007"] +[0.071867, "o", "\u001b]4;208;rgb:fe/80/19\u0007"] +[0.072747, "o", "\u001b]4;88;rgb:9d/00/06\u0007"] +[0.073618, "o", "\u001b]4;100;rgb:79/74/0e\u0007"] +[0.074469, "o", "\u001b]4;136;rgb:b5/76/14\u0007"] +[0.075365, "o", "\u001b]4;24;rgb:07/66/78\u0007"] +[0.076257, "o", "\u001b]4;96;rgb:8f/3f/71\u0007"] +[0.077169, "o", "\u001b]4;66;rgb:42/7b/58\u0007"] +[0.078065, "o", "\u001b]4;130;rgb:af/3a/03\u0007"] +[0.100228, "o", "\u001b]1337;RemoteHost=eugene@Eugenes-MacBook-Pro.local\u0007\u001b]1337;CurrentDir=/Users/eugene/Projects/Personal/fixit\u0007"] +[0.100261, "o", "\u001b]1337;ShellIntegrationVersion=17;shell=fish\u0007"] +[0.10539, "o", "\u001b[?2004h"] +[0.105512, "o", "\u001b]7;file://Eugenes-MacBook-Pro.local/Users/eugene/Projects/Personal/fixit\u0007"] +[0.138635, "o", "\u001b]0;fish ~/P/P/fixit\u0007\u001b[30m\u001b(B\u001b[m\r"] +[0.13867, "o", "\u001b]133;D;0\u0007\u001b]1337;RemoteHost=eugene@Eugenes-MacBook-Pro.local\u0007\u001b]1337;CurrentDir=/Users/eugene/Projects/Personal/fixit\u0007\u001b]133;A\u0007\u001b[J\u001b[K\r\n\u001b[1;36mfixit\u001b[0m on \u001b[1;35m master\u001b[0m \u001b[1;31m[!?]\u001b[0m is \u001b[1;38;5;208m📦 v0.1.0\u001b[0m via \u001b[1;31m🦀 v1.78.0 \u001b[0m\u001b[K\r\n\u001b[1;32m❯\u001b[0m \u001b]133;B\u0007\u001b[K\r\u001b[C\u001b[C"] +[0.599372, "o", "g\r\u001b[3C"] +[0.599847, "o", "\b\u001b[38;2;255;221;115mg\u001b[30m\u001b(B\u001b[m\r\u001b[3C"] +[0.60208, "o", "\u001b[38;2;255;196;115mit push\u001b[30m\u001b(B\u001b[m\r\u001b[3C"] +[0.668715, "o", "\u001b[38;2;255;221;115mt\u001b[30m\u001b(B\u001b[m\u001b[K\r\u001b[4C"] +[0.694015, "o", "\u001b[38;2;255;196;115mac \u001b[30m\u001b(B\u001b[m\r\u001b[4C"] +[0.794159, "o", "\u001b[38;2;255;221;115mi\u001b[30m\u001b(B\u001b[m\u001b[K\r\u001b[5C"] +[0.81636, "o", "\u001b[38;2;255;196;115mmeout \u001b[30m\u001b(B\u001b[m\r\u001b[5C"] +[1.011454, "o", "\u001b[38;2;255;221;115m \u001b[30m\u001b(B\u001b[m\u001b[K\r\u001b[6C\b \r\u001b[6C"] +[1.098283, "o", "p\r\u001b[7C"] +[1.0989, "o", "\b\u001b[38;2;255;192;0mp\u001b[30m\u001b(B\u001b[m\r\u001b[7C"] +[1.336612, "o", "\u001b[38;2;255;192;0mu\u001b[30m\u001b(B\u001b[m\r\u001b[8C"] +[1.444909, "o", "\u001b[38;2;255;192;0ms\u001b[30m\u001b(B\u001b[m\r\u001b[9C"] +[1.607734, "o", "\u001b[38;2;255;192;0mh\u001b[30m\u001b(B\u001b[m\r\u001b[10C"] +[2.066576, "o", "\r\n"] +[2.066785, "o", "\u001b[30m\u001b(B\u001b[m"] +[2.086961, "o", "\u001b]133;C;\u0007\u001b[?2004l"] +[2.087103, "o", "\u001b]0;gti push\u0007\u001b[30m\u001b(B\u001b[m\r"] +[2.089215, "o", "fish: Unknown command: gti\r\n"] +[2.089421, "o", "\u001b[2m⏎\u001b(B\u001b[m \r⏎ \r\u001b[K"] +[2.096913, "o", "\u001b[?2004h"] +[2.132061, "o", "\u001b]0;fish ~/P/P/fixit\u0007\u001b[30m\u001b(B\u001b[m\r"] +[2.13214, "o", "\u001b]133;D;127\u0007\u001b]1337;RemoteHost=eugene@Eugenes-MacBook-Pro.local\u0007\u001b]1337;CurrentDir=/Users/eugene/Projects/Personal/fixit\u0007\u001b]133;A\u0007\u001b[J\u001b[K\r\n\u001b[1;36mfixit\u001b[0m on \u001b[1;35m master\u001b[0m \u001b[1;31m[!?]\u001b[0m is \u001b[1;38;5;208m📦 v0.1.0\u001b[0m via \u001b[1;31m🦀 v1.78.0 \u001b[0m\u001b[K\r\n\u001b[1;31m❯\u001b[0m \u001b]133;B\u0007\u001b[K\r\u001b[C\u001b[C"] +[2.621113, "o", "f\r\u001b[3C\u001b[38;2;255;196;115mix\u001b[30m\u001b(B\u001b[m\r\u001b[3C"] +[2.621598, "o", "\b\u001b[38;2;255;221;115mf\u001b[38;2;255;196;115mix\u001b[30m\u001b(B\u001b[m\r\u001b[3C"] +[2.98559, "o", "\u001b[38;2;255;221;115mi\u001b[38;2;255;196;115mx\u001b[30m\u001b(B\u001b[m\r\u001b[4C"] +[3.315871, "o", "\u001b[38;2;255;221;115mx\u001b[30m\u001b(B\u001b[m\r\u001b[5C"] +[3.316707, "o", "\r\u001b[5C\b\b\b\u001b[38;2;255;148;0mfix\u001b[30m\u001b(B\u001b[m\r\u001b[5C"] +[3.52684, "o", "\r\u001b[5C\r\n\u001b[30m\u001b(B\u001b[m"] +[3.547119, "o", "\u001b]133;C;\u0007\u001b[?2004l"] +[3.547335, "o", "\u001b]0;fix\u0007\u001b[30m\u001b(B\u001b[m\r"] +[3.553898, "o", "⠁ Getting command output... "] +[3.606935, "o", "\r\u001b[2K⠁ Finding fixes... "] +[3.625361, "o", "\r\u001b[2K"] +[3.625421, "o", "\u001b[?25l\u001b[33m?\u001b[0m \u001b[1m↓(j)/↑(k)/enter(space)/[q]uit(esc/ctrl-c)\u001b[0m \u001b[38;5;8m›\u001b[0m [Page 1/14] \r\n\u001b[32m❯\u001b[0m \u001b[36mgit push\u001b[0m\r\n gtail push\r\n gptx push\r\n gpt push\r\n gstat push\r\n"] +[4.648641, "o", "\u001b[6A\r\u001b[2K\u001b[1B\r\u001b[2K\u001b[1B\r\u001b[2K\u001b[1B\r\u001b[2K\u001b[1B\r\u001b[2K\u001b[1B\r\u001b[2K\u001b[1B\u001b[6A"] +[4.64872, "o", "\u001b[32m✔\u001b[0m \u001b[1m↓(j)/↑(k)/enter(space)/[q]uit(esc/ctrl-c)\u001b[0m \u001b[38;5;8m·\u001b[0m \u001b[32mgit push\u001b[0m\r\n\u001b[?25h"] +[4.650667, "o", "\u001b[2m⏎\u001b(B\u001b[m \r⏎ \r\u001b[K"] +[4.659521, "o", "\u001b[?2004h"] +[4.703181, "o", "\u001b]0;fish ~/P/P/fixit\u0007\u001b[30m\u001b(B\u001b[m"] +[4.70322, "o", "\r"] +[4.703356, "o", "\u001b]133;D;0\u0007\u001b]1337;RemoteHost=eugene@Eugenes-MacBook-Pro.local\u0007\u001b]1337;CurrentDir=/Users/eugene/Projects/Personal/fixit\u0007\u001b]133;A\u0007\u001b[J\u001b[K\r\n\u001b[1;36mfixit\u001b[0m on \u001b[1;35m master\u001b[0m \u001b[1;31m[!?]\u001b[0m is \u001b[1;38;5;208m📦 v0.1.0\u001b[0m via \u001b[1;31m🦀 v1.78.0 \u001b[0m\u001b[K\r\n\u001b[1;32m❯\u001b[0m \u001b]133;B\u0007git push\u001b[K\r\u001b[10C"] +[4.703375, "o", "\r\u001b[10C"] +[4.703382, "o", "\b\b\b\b\b\b\b\b\u001b[38;2;255;148;0mgit\u001b[30m\u001b(B\u001b[m \u001b[38;2;255;192;0mpush\u001b[30m\u001b(B\u001b[m\r\u001b[10C\r\n"] +[4.703474, "o", "\u001b[30m\u001b(B\u001b[m"] +[4.71524, "o", "\u001b]133;C;\u0007\u001b[?2004l"] +[4.715308, "o", "\u001b]0;git push\u0007\u001b[30m\u001b(B\u001b[m\r"] +[5.448233, "o", "Everything up-to-date\r\n"] +[5.451355, "o", "\u001b[2m⏎\u001b(B\u001b[m \r⏎ \r\u001b[K"] +[5.457632, "o", "\u001b[?2004h"] +[5.489044, "o", "\u001b]0;fish ~/P/P/fixit\u0007\u001b[30m\u001b(B\u001b[m"] +[5.489069, "o", "\r\u001b]133;D;0\u0007\u001b]1337;RemoteHost=eugene@Eugenes-MacBook-Pro.local\u0007\u001b]1337;CurrentDir=/Users/eugene/Projects/Personal/fixit\u0007\u001b]133;A\u0007\u001b[J\u001b[K\r\n\u001b[1;36mfixit\u001b[0m on \u001b[1;35m master\u001b[0m \u001b[1;31m[!?]\u001b[0m is \u001b[1;38;5;208m📦 v0.1.0\u001b[0m via \u001b[1;31m🦀 v1.78.0 \u001b[0m\u001b[K\r\n\u001b[1;32m❯\u001b[0m \u001b]133;B\u0007\u001b[K\r\u001b[C\u001b[C"] +[7.406677, "o", "\r\n"] +[7.406747, "o", "\u001b[30m\u001b(B\u001b[m\u001b[30m\u001b(B\u001b[m"] +[7.406988, "o", "\u001b[?2004l"] diff --git a/doc/demo.gif b/doc/demo.gif new file mode 100644 index 0000000..7c6dd6b Binary files /dev/null and b/doc/demo.gif differ