]> Sergey Matveev's repositories - zk.zsh.git/commitdiff
Simpler relative call
authorSergey Matveev <stargrave@stargrave.org>
Sun, 13 Mar 2022 08:34:56 +0000 (11:34 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 13 Mar 2022 08:34:56 +0000 (11:34 +0300)
But it is still very slow.

zk.zsh

diff --git a/zk.zsh b/zk.zsh
index 56e071f8af79e60139d3b569ec5870fb79b9b74f..c7dc04eeec34baa720fa9ae288f0e21f95edb7d4 100755 (executable)
--- a/zk.zsh
+++ b/zk.zsh
@@ -51,9 +51,7 @@ for p (${(k)backs}) {
 
 autoload -U relative
 getrel() {
-    local tgt=$2:a
-    cd $1:h
-    relative $tgt
+    relative $2:a $1:h
 }
 
 genhtml() {