diff options
| author | useredsa <emilio.dominguezs@um.es> | 2020-10-20 15:38:40 +0200 |
|---|---|---|
| committer | useredsa <emilio.dominguezs@um.es> | 2020-10-20 15:38:40 +0200 |
| commit | bff8fe3ce1920c2107d7bbf310da3298500eaf8f (patch) | |
| tree | 2a78b4ab0adfdeeb7892bf35a9b6dbc0ff64d0d9 | |
| parent | 4b36468821072aec7a262aca901350df7b708a33 (diff) | |
Changed expected order of line:column and file in :edit
Now it respects Kakoune's man page.
| -rwxr-xr-x | rc/connect/commands/:edit | 12 |
1 files 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" ;; |
