aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
index 761883c..aa9adb4 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,30 @@ config.
## Usage
+```shell
+# setup example "remembering" repository
+$ git clone git://euandreh.xyz/remembering
+$ cd remembering/
+```
+
+Now inside the repository folder, running `git permalink` will try build the web URL of the given file use `xdg-open` to launch the browser (or whatever is configured):
+
+```shell
+$ git permalink tests/ranking.sh
+Opening https://git.euandreh.xyz/remembering/tree/tests/ranking.sh?id=44533e2df144e7749a382e298aea53ca11a2239e
+$ git permalink tests/ranking.sh 23
+Opening https://git.euandreh.xyz/remembering/tree/tests/ranking.sh?id=44533e2df144e7749a382e298aea53ca11a2239e#n23
+```
+
+Or if you just want to output the link without invoking `xdg-open`, you can use the `-p` flag:
+
+```shell
+$ git permalink -p tests/ranking.sh 23
+https://git.euandreh.xyz/remembering/tree/tests/ranking.sh?id=44533e2df144e7749a382e298aea53ca11a2239e#n23
+$ git permalink -p tests/ranking.sh 23
+https://git.euandreh.xyz/remembering/tree/-p?id=44533e2df144e7749a382e298aea53ca11a2239e#ntests/ranking.sh
+```
+
## Installation