Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / shells / zsh / zsh-deer / realpath.patch
blob03850d7e5c129914ef528324c5658f979f1bf4c7
1 From ceadb2f11119143af4f590ea6b05a531483219b5 Mon Sep 17 00:00:00 2001
2 From: xd1le <elisp.vim@gmail.com>
3 Date: Wed, 30 Aug 2017 17:27:20 +1000
4 Subject: [PATCH] use realpath instead of python to calculate relative path
6 ---
7 deer | 5 +----
8 1 file changed, 1 insertion(+), 4 deletions(-)
10 diff --git a/deer b/deer
11 index 3d89dea..804a871 100644
12 --- a/deer
13 +++ b/deer
14 @@ -259,10 +259,7 @@ deer-get-relative()
16 local TMP
17 TMP=${1:-${DEER_DIRNAME%/}/$DEER_BASENAME[$DEER_DIRNAME]}
18 - TMP="`python -c '
19 -import sys, os
20 -print(os.path.relpath(sys.argv[1], sys.argv[2]))
21 -' $TMP ${DEER_STARTDIR:-$PWD}`"
22 + TMP="`realpath --relative-to=${DEER_STARTDIR:-$PWD} $TMP`"
23 print -R $TMP:q
26 --
27 2.14.1