Ctags How to use Ctags 1

Source: Internet
Author: User

Share a script that ctags generate the specified tags

This is quite fast for browsing the Android source code

How to use:

./ctags

that executes

Ctags-r--verbose=no--languages=c,c++,--if0 bootable device frameworks hardware kernel* libcore Vendor

Recursively retrieves bootable device frameworks hardware kernel* libcore Vendor folder (file) in the current directory to the c,c++ type file (c + + Type of file contains the. h suffix file, so the. h file is also retrieved) and retrieves what if 0 contains


./ctags c C + + Java

that executes

Ctags-r--verbose=no--languages=c,c++,java, bootable device frameworks hardware kernel* libcore Vendor

Recursively retrieves bootable device frameworks hardware kernel* libcore Vendor folder (file) in the current directory to the C,c++,java type file (c + + Type of file contains the. h suffix file, so the. h file is also retrieved) and retrieves what if 0 contains


Script content:

#!/bin/bash
Tagspath= "Bootable device frameworks hardware kernel* libcore vendor"
see= "--verbose=no"
If [$#-eq 0];then


ctags-r $see--languages=c,c++--if0 ${tagspath} &
Echo ""
Echo "ctags-r $see--languages=c,c++--if0 ${tagspath} & "
echo" "


elif [$#-gt 0];then
If [$ = =]--hel P "];then
echo" "
echo" [Tagspath: ${tagspath}] "
echo" [Print:    ${see}] "
echo" example:./ Ctags Codepath "
echo" Example:./ctags Codepath C C + + java "
echo" "
Else
Ctags-r $see--languages=$1, $2,$3,$4,$5--if0 ${tagspath} &
Echo ""
Echo "Ctags-r $see--languages=$1,$2,$3,$4,$5--if0 ${tagspath} &am P; "
echo ""
Fi
Fi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.