alt
Find alternate files for source and test switching
TLDR
Find alternate file
SYNOPSIS
alt [-d directory] [-e extension] file
DESCRIPTION
alt finds the "alternate file" for a given source file, typically switching between implementation and test files. It uses intelligent pattern matching to find related files based on common naming conventions.
For example, given app/models/user.rb, it would find test/models/user_test.rb or spec/models/user_spec.rb. This makes it easy to jump between code and tests in editor integrations.
PARAMETERS
-d directory
Limit search to specific directory-e extension
Specify alternate file extension-v, --version
Display version information
CAVEATS
Pattern matching relies on common conventions; unusual project structures may not work. Results depend on files actually existing in expected locations.
HISTORY
alt was created as a fast alternative to similar tools in vim and other editors, designed to work independently of any specific editor and integrate via shell commands.
