From owner-freebsd-bugs Sat Dec 8 20: 0:16 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AC2E637B416 for ; Sat, 8 Dec 2001 20:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fB9402n78096; Sat, 8 Dec 2001 20:00:02 -0800 (PST) (envelope-from gnats) Received: from t-mta2.odn.ne.jp (mfep2.odn.ne.jp [143.90.131.180]) by hub.freebsd.org (Postfix) with ESMTP id 61D1037B419 for ; Sat, 8 Dec 2001 19:53:40 -0800 (PST) Received: from choota.signet.or.jp ([61.209.170.140]) by t-mta2.odn.ne.jp with ESMTP id <20011209035339402.DUKM.1902.t-mta2.odn.ne.jp@mta2.odn.ne.jp> for ; Sun, 9 Dec 2001 12:53:39 +0900 Received: (from shigio@localhost) by choota.signet.or.jp (8.11.3/) id fB93pqo00851; Sun, 9 Dec 2001 12:51:52 +0900 (JST) Message-Id: <200112090351.fB93pqo00851@tamacom.com> Date: Sun, 9 Dec 2001 12:51:52 +0900 (JST) From: shigio@tamacom.com Reply-To: shigio@tamacom.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/32636: Improved less powered by GLOBAL. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 32636 >Category: bin >Synopsis: Improved less powered by GLOBAL. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Dec 08 20:00:02 PST 2001 >Closed-Date: >Last-Modified: >Originator: Shigio Yamaguchi >Release: FreeBSD 4.3-RELEASE i386 >Organization: Tama Communications Corporation >Environment: System: FreeBSD choota.signet.or.jp 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Thu Jul 5 11:01:05 JST 2001 shigio@choota.signet.or.jp:/usr/src/sys/compile/GENERIC i386 >Description: I have made a patch for less-358. It support following facilities: o Support multi tag Improved less supports following tag files: Traditional tags by ctags. Extended tags by Exuberant Ctags GLOBAL's tag by global. Ctags -x format from stdin. User can specify tag file by the -T option. By default, Tag file name is "tags". But if the file is not found then new less use GTAGS. % ls tags tags % less -t main -- tag file is 'tags' (default) % less -TGTAGS -t main -- use GTAGS % ctags -x *.c | less -T- -- use ctags -x format from stdin % ls tags ls: tags: No such file or directory % less -t main -- use GTAGS About GLOBAL's tag, GTAGS, GRTAGS, GSYMS and GPATH are available as tag file name. User must not specify the path (GLOBAL locate the path instead of you.) About ctags -x format, both of standard and extended format are supported. [standard format] +------------------------------------------------ |main 30 main.c main(argc, argv) |func 21 subr.c func(arg) The following commands write this format. o Traditinal Ctags with -x option o Global with -x option [extended format] +---------------------------------------------------------- |main function 30 main.c main(argc, argv) |func function 21 subr.c func(arg) Exuberant Ctags with -x option write this format. See Following usages are available with this facility. % global -xg 'lseek(.*)' | less -T- # grep(1) needed. % global -xI func | less -T- # id-utils(1) needed. % ctags -x func | less -T- o Support duplicated tag Improved less also supports duplicated tag entries. This facility is supported in all tag files. In traditional tag file, it is treated special case that tag is only one. At first, less shows the first tag. User can move to the next or previous entry by 't'(next) and 'T'(previous) command. 't' go to the next entry 'T' go to the previous entry o Rare case spec If user invoke examin command while tag structure loaded, less cleanup tag structure leaving ifile structure. (1) % less -t main ... [lessecho.c (tag 1 of 4)] <- 4 tags found. currently lessecho.c loaded. (2) Examine: edit.c <- examine 'edit.c' (3) ... [edit.c (file 2 of 2)] <- insert edit.c in ifile structure. (4) t <- go to next tag [No next tag (press RETURN)] <- no tag structure If user use stdin as tag file (by -T- option) and invoke ':t' command in less then less use default tag file, that is, 'tags'. >How-To-Repeat: N/A >Fix: Above patch is available at: http://www.tamacom.com/unix/less-358+gtags.tar.gz >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message