Go to mfiles, folders and labels

버전 1.0.0.0 (15 KB) 작성자: Sandor Toth
The MATLAB cd command on steroids
다운로드 수: 21
업데이트 날짜: 2017/8/9

Save, go to, go back and retrieve folders identified by arbitrary label. The function helps if one works on multiple projects and needs to change folders quickly. It keeps a database of labels assigned to folders and can switch between them quickly. It can also go to folders of any m-file that is on the MATLAB search path.
go(label,path)
Adds path and the corresponding label to the list of saved path. If the label already exists, it will be overwritten. The command automatically exchange the user home folder path to '~' for unix based systems.
go

Prints all label - path pairs to the MATLAB Command Window.

go(label)

Changes the directory to the path based on the following rules in order of precedence:

- if the label is a valid path the command is equivalent to the MATLAB built-in cd command
- if the label is a matlab function, the new path is the folder of the function
- if the label exists in the go.db file, go to the corresponding folder If none of the above rules are fulfilled, gives a warning.
path = go(label) Returns the path that corresponds to the given label.

go clear

Clears the database.

go back

Goes back to the previous path from where go() was called last time. Can be only used to go back one level.

go label here

To abel to use the command without string notation and brackets, the here string is automaticelly replaced by the output of the pwd() function (current path). The labels are case sensitive. The list of label path pairs are saved into the text file $USERPATH/go.db. The function comes with a functionSignatures.json file that supports automatic substitution of labels and file names (similarly to the built-in cd command).

인용 양식

Sandor Toth (2024). Go to mfiles, folders and labels (https://github.com/tsdev/go), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2012a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.0.0.0

Fixed spelling

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.