From f6b8e42c1acc6b2c4539684990994836d31c94ea Mon Sep 17 00:00:00 2001 From: Kostiantyn Dovgal Date: Thu, 12 Jan 2017 01:33:34 +0200 Subject: [PATCH] Add caret substitution tip --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e06f85b..c6ae3c1 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,14 @@ Notes: - For interactive selection of values from the output of another command, use [`percol`](https://github.com/mooz/percol) or [`fzf`](https://github.com/junegunn/fzf). +- For running the previous command with a subtle change, use a substitution with caret symbols according to the following syntax `^old^new`. Works only for the first match. Examples: +```sh + git diff file1 file2 + ^diff^add # git add file1 file2 + echo b b c + ^b^a # echo a b c +``` + - For interaction with files based on the output of another command (like `git`), use `fpp` ([PathPicker](https://github.com/facebook/PathPicker)). - For a simple web server for all files in the current directory (and subdirs), available to anyone on your network, use: