[OS] cscope
Updated:
개요
- https://cscope.sourceforge.net/
- 소스 코드를 찾아보기 위한 개발자 도구
설치
dnf install cscope
명령어
- 함수/변수 찾기
:cs find s xxx
- 폴더/파일 찾기
:cs find f xxx
- 내용 찾기
:cs find e xxx
- 함수 정의로 이동
ctrl + ]
- 이전으로 이동
ctrl + t
C++ shell file
find_dir="./"
cscope_file="cscope.files"
find ${find_dir} -type f -name "*.[.ch]" > $cscope_file
find ${find_dir} -type f -name "*.cpp" >> $cscope_file
find ${find_dir} -type f -name "*.hpp" >> $cscope_file
find ${find_dir} -type f -name "*.hxx" >> $cscope_file
cscope -b -i $cscope_file
Go shell file
#!/bin/bash
find ./ -name "*.go" -print > cscope.files
cscope -b -k