raco fc:   Finding Collections
1 Installation
2 Usage
8.12

raco fc: Finding Collections🔗ℹ

The raco fc command-line tool allows you to locate where collections or packages are installed.

1 Installation🔗ℹ

Run raco pkg install raco-find-collection or install it from the DrRacket package manager.

2 Usage🔗ℹ

The most convenient way to use this tool is to install shell functions like the following in your .bashrc:

function rfc() {

  cd `racket -l find-collection/run -- $@`

}

 

# interactive version

function rfci() {

  cd `racket -l find-collection/run -- -i $@`

}

For example, the invocation rfc typed-racket will change the current directory to the implementation directory for Typed Racket.

More generally, the invocation

raco fc <pkg-or-collection-name>

will return a path to the location on the filesystem where the named package or collection is installed. If there are multiple matches, an arbitrary one is returned.

Collection paths are prioritized over package paths if the name could match either.

If a collection or package cannot be found, the command returns the current directory (for convenience in scripts that use cd).

If you supply the -i option, the tool will ask you to disambiguate when there are multiple matches by printing to standard error. Enter a numeric response to choose a match.