Crates.io | hike |
lib.rs | hike |
version | 0.1.2 |
source | src |
created_at | 2018-04-05 21:04:27.579458 |
updated_at | 2018-04-22 19:20:49.996187 |
description | Go to a directory, run a command and come back |
homepage | |
repository | https://github.com/drozdziak1/hike |
max_upload_size | |
id | 59151 |
size | 4,547 |
Have you ever wanted to run just one command in a different
directory? Did you have to cd
there, do your thing and then cd
back where
you came from? No matter what you do, it'll always take at least three commands!
Don't you find that frustrating?
It's time your worries took a Hike!
Jokes aside, Hike is a small program I wrote for getting to know the Rust crate release process better. Running it with
$ hike some_dir "some --command with --arguments=and | possibly --pipes"
is equivalent to
$ pushd some_dir
$ some --command with --arguments=and | possibly --pipes
$ popd
It tries to be as transparent as possible and passes whatever stderr/stdout
output or error code the inner command produces back to your shell as if you
used pushd
/popd
. Using the system()
libc function ensures that it'll
always use its enclosing shell.
Enjoy!