/usr/share/elvis/scripts/cursor.ex is in elvis-common 2.2.0-11.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | " This file defines a :cursor alias, which moves the cursor to a given line
" of a given file. This is handy if you want some external program to move
" elvis' cursor -- you can (under X-windows at least) say...
"
" elvis -client -c "cursor $line $file"
alias cursor {
"Move the cursor to a given line, in a given file
if !isnumber("!1") || !exists("!2")
then error Usage: cursor linenumber filename
if filename != "!2"
then {
if buffer("!2")
then (!2)!1
else e +!1 !2
}
else !1
}
|