rd

command module
v0.0.0-...-03587c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2023 License: Unlicense Imports: 6 Imported by: 0

README

$ go install github.com/avamsi/rd@latest
cd() {
	# Keep the original cd error hidden for if rd succeeds below.
	builtin cd $@ 2>/tmp/rd-cde || {
		# Note: don't try to "fix" this by adding `local`, it doesn't work.
		# For whatever reason, the `&&` chaining behaviour is lost with it.
		d=$(rd $@) && builtin cd $d || {
			# No luck, show the original error as well.
			cat /tmp/rd-cde
			return 1
		}
	}
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL