From 653f08a81a914fb31c49fb718513cf116c6f1b8d Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sat, 24 Feb 2024 16:37:56 +0200 Subject: [PATCH] ^: add page (#12341) * ^: add page --------- Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> --- pages/common/^.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pages/common/^.md diff --git a/pages/common/^.md b/pages/common/^.md new file mode 100644 index 000000000..443a46081 --- /dev/null +++ b/pages/common/^.md @@ -0,0 +1,17 @@ +# Caret + +> Bash builtin to quick substitute a string in the previous command and run the result. +> Equivalent to `!!:s^string1^string2`. +> More information: . + +- Run the previous command replacing `string1` with `string2`: + +`^{{string1}}^{{string2}}` + +- Remove `string1` from the previous command: + +`^{{string1}}^` + +- Replace `string1` with `string2` in the previous command and add `string3` to its end: + +`^{{string1}}^{{string2}}^{{string3}}`