aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Allen <screwtape@froup.com>2016-05-28 18:01:17 +1000
committerTim Allen <screwtape@froup.com>2016-05-28 18:01:17 +1000
commitc9e0d7735fbf0ca71c003ec6480960a664f1db06 (patch)
tree1977c794647adc7e6638fa316f0b9580185cf6a7
parent958dc002a077997358361d9bff7a245137307d78 (diff)
downloadvis-c9e0d7735fbf0ca71c003ec6480960a664f1db06.tar.gz
vis-c9e0d7735fbf0ca71c003ec6480960a664f1db06.tar.xz
[vis-open] Don't use realpath(1).
Despite how useful realpath is, apparently it's not POSIX and isn't part of the BSD userland.
-rwxr-xr-xvis-open3
1 files changed, 2 insertions, 1 deletions
diff --git a/vis-open b/vis-open
index b6bf664..997aa49 100755
--- a/vis-open
+++ b/vis-open
@@ -50,7 +50,8 @@ if [ $# -eq 1 -a "$ALLOW_AUTO_SELECT" = 1 ]; then
else
# We've found a single item, and it's not a directory,
# so it must be a filename (or file-like thing) to open.
- echo $(realpath "$1")
+ cd "$(dirname "$1")"
+ echo "$(pwd -P)"/"$(basename "$1")"
exit 0
fi
fi