Skip to content

AleksanderEvensen/cfd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Change Fuzzy Directory

A fuzzy finder alternative to the classic cd command

CFD in action

This standalone exe can't change the current working directory, and needs to be paired up with a shell script

PowerShell:

function cfd {
	# Run Executable
	$result = . "./path/to/cfd/binary.exe" $args # Or "cfd" if cfd is in your path

	# Check for result
	if ($result) {

		# Set Location to the returned value
		Set-Location $result
	}
}

Bash (.bashrc) / Zsh (.zshrc)

cfd() {
    local result=$(./path/to/cfd/binary "$@") # Or "command cfd" if cfd is in your path
    [ -n "$result" ] && cd -- "$result"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages