shithub: bin.rc

ref: c57c8ab75d68d973e7b032792c6b729efcc13a93
dir: /bin/k/

View raw version
#!/bin/rc
# k - mark position (from sam)

marks=$ws/marks
if(~ $#marks 0)
	marks=/tmp/marks.default

while(~ $1 -* && ! ~ $1 --){
	switch($1){
	case -c
		>$marks; exit
	case -p
		plumb -d edit $marks
	case -v
		test -f $marks && window 'label marks; tail -f '$marks
		exit
	case *;
		exit usage
	}
	shift
}
if(~ $1 --)
	shift
	
if(~ $#% 0)
	exit notsam
echo $%:$'%l' $* >>$marks