mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
plumb: column numbers in file address
R=rsc http://codereview.appspot.com/2776042
This commit is contained in:
parent
c8471ac58c
commit
c84e737c3f
2 changed files with 10 additions and 0 deletions
|
@ -59,6 +59,15 @@ arg isfile $0
|
|||
plumb to openoffice
|
||||
plumb start openoffice $file
|
||||
|
||||
# existing files tagged by line number:columnumber or linenumber.columnumber, go to editor
|
||||
type is text
|
||||
data matches '([.a-zA-Z¡-0-9_/\-]*[a-zA-Z¡-0-9_/\-])'$twocolonaddr'
|
||||
arg isfile $1
|
||||
data set $file
|
||||
attr add addr=$2-#0+#$3
|
||||
plumb to edit
|
||||
plumb client $editor
|
||||
|
||||
# existing files, possibly tagged by line number, go to editor
|
||||
type is text
|
||||
data matches '([.a-zA-Z¡-0-9_/\-]*[a-zA-Z¡-0-9_/\-])('$addr')?'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
addrelem='((#?[0-9]+)|(/[A-Za-z0-9_\^]+/?)|[.$])'
|
||||
addr=:($addrelem([,;+\-]$addrelem)*)
|
||||
|
||||
twocolonaddr = :([0-9]+)[:.]([0-9]+)
|
||||
|
|
Loading…
Reference in a new issue