Skip to content

The command that searches the current directory or parent directories for a specific file and returns the closest path

License

Notifications You must be signed in to change notification settings

corrupt952/closest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

closest

The command that searches the current directory or parent directories for a specific file and returns the closest path

Usage

Example

The directory structure is as follows, where staging is the current directory.

/
└── home
    └── john
        └── terraform
            ├── .tflint.hcl
            └── example-service
                ├── production
                └── staging # <- current directory

If you want to search for a .tflint.hcl, you can run closest .tflint.hcl, which will return /home/john/terraform/.tflint.hcl.

tflint --config $(closest .tflint.hcl)

About

The command that searches the current directory or parent directories for a specific file and returns the closest path

Topics

Resources

License

Stars

Watchers

Forks

Languages