From 38e40e24cb5081e6dc2197d7d4b44fae3ce7d629 Mon Sep 17 00:00:00 2001 From: Alex Leferry 2 Date: Mon, 15 Oct 2018 13:32:25 +0200 Subject: Add a simple and naive implementation of realpath for macOS Fixes #1 --- bin/kak-connect | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin') diff --git a/bin/kak-connect b/bin/kak-connect index b0975f8..5c27e8f 100755 --- a/bin/kak-connect +++ b/bin/kak-connect @@ -1,5 +1,18 @@ #!/bin/sh +# Simple and naive implementation of realpath for macOS +realpath() { + file=$1 + case "$file" in + /*) + echo "$file" + ;; + *) + echo "$PWD/${file#./}" + ;; + esac +} + if [ $KAK_SESSION ] && [ $KAK_CLIENT ]; then # Support to target line and column for the first file # $ kak +:[column] -- cgit v1.2.3