mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
e90d316f19
Without this it tries to run /usr/bin/vim. Patch is already accepted upstream.
31 lines
901 B
Diff
31 lines
901 B
Diff
From 2008bf62e13ebe41cdad3e16f8b42f46ae393876 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
|
|
Date: Tue, 6 Jan 2015 20:39:41 +0100
|
|
Subject: [PATCH] vimdot: lookup 'vim' in $PATH
|
|
|
|
Instead of hardcoding /usr/bin/vim. Needed for NixOS (http://nixos.org), and is
|
|
probably useful for others too.
|
|
---
|
|
plugin/xlib/vimdot.sh | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/plugin/xlib/vimdot.sh b/plugin/xlib/vimdot.sh
|
|
index 749fe6a..4e6dd4b 100755
|
|
--- a/plugin/xlib/vimdot.sh
|
|
+++ b/plugin/xlib/vimdot.sh
|
|
@@ -3,9 +3,9 @@
|
|
|
|
error() { echo "$0: $*" >&2; exit 1; }
|
|
|
|
-editor="/usr/bin/vim"
|
|
+editor="vim"
|
|
|
|
-if ! test -x "$editor"; then error "the \"$editor\" editor not found or not executable"; fi
|
|
+if ! test -x "$(command -v "$editor")"; then error "the \"$editor\" editor not found or not executable"; fi
|
|
|
|
default="noname.gv"
|
|
|
|
--
|
|
2.1.3
|
|
|