diff options
| author | Alex Leferry 2 <alexherbo2@gmail.com> | 2018-10-15 13:32:25 +0200 |
|---|---|---|
| committer | Alex Leferry 2 <alexherbo2@gmail.com> | 2018-10-15 13:36:25 +0200 |
| commit | 38e40e24cb5081e6dc2197d7d4b44fae3ce7d629 (patch) | |
| tree | 8f4c5207e38dab1998dcf298d620c02c7a60fd14 /bin | |
| parent | 58ac1a281b2e8123d71ef0f3f2751a097ca8734c (diff) | |
Add a simple and naive implementation of realpath for macOS
Fixes #1
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/kak-connect | 13 |
1 files changed, 13 insertions, 0 deletions
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 <file> +<line>:[column] |
