From bff8fe3ce1920c2107d7bbf310da3298500eaf8f Mon Sep 17 00:00:00 2001 From: useredsa Date: Tue, 20 Oct 2020 15:38:40 +0200 Subject: Changed expected order of line:column and file in :edit Now it respects Kakoune's man page. --- rc/connect/commands/:edit | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/rc/connect/commands/:edit b/rc/connect/commands/:edit index 15afe39..c604bc3 100755 --- a/rc/connect/commands/:edit +++ b/rc/connect/commands/:edit @@ -8,20 +8,22 @@ # Open files commands=$( while [ "$1" ]; do - file=$(realpath "$1") - case "$2" in + case "$1" in ('+'*':'*) - line=${2#+}; line=${line%:*} - column=${2#*:} + line=${1#+}; line=${line%:*} + column=${1#*:} + file=$(realpath "$2") shift 2 kak_escape edit "$file" "$line" "$column" ;; ('+'*) - line=${2#+} + line=${1#+} + file=$(realpath "$2") shift 2 kak_escape edit "$file" "$line" ;; (*) + file=$(realpath "$1") shift 1 kak_escape edit "$file" ;; -- cgit v1.2.3