about summary refs log tree commit diff
path: root/profile/.profile.d/vi.sh
blob: d93b91d15086a75138ce1f3698395ae73f4f3c56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

_implementations="
vim
vi
"

for _implementation in ${_implementations}; do
	# shellcheck disable=SC2139
	command -v "${_implementation}" >/dev/null 2>&1 &&
		alias vim="${_implementation}" &&
		alias vi="${_implementation}" &&
		alias v="${_implementation}" &&
		break
done

unset _implementation _implementations

Consider giving Nix/NixOS a try! <3