summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaupiqueur <alexherbo2@gmail.com>2020-10-20 16:18:10 +0200
committerGitHub <noreply@github.com>2020-10-20 16:18:10 +0200
commitce8aec57a6b4438d8873364d1f1f80d498569999 (patch)
tree2a78b4ab0adfdeeb7892bf35a9b6dbc0ff64d0d9
parent4b36468821072aec7a262aca901350df7b708a33 (diff)
parentbff8fe3ce1920c2107d7bbf310da3298500eaf8f (diff)
Merge pull request #32 from useredsa/master
Changed expected order of line:column and file in :edit
-rwxr-xr-xrc/connect/commands/:edit12
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"
;;