Yeah is a CLI designed to improve the workflow of a shell. Pull requests + more commands are welcome!
The following commands are currently supported:
- Goto: Save keywords as directory shortcuts and change to thier directory
- Custom Commands: Execute custom commands written within a
yeah.yml
file
- Clone the repo
- We have to source our yeah.sh file. So, in your shell config (ie,
.bash_profile
,.bashrc
,.zshrc
, etc) set:
if [[ -f /your/path/to/yeah/yeah.sh ]]
then
source /your/path/to/yeah/yeah.sh
fi
- Reload your shell
Easily get help for any available Yeah command.
- Usage:
yeah help some_command
- Note that if there is a project context (ie, a
yeah.yml
file), then you will be able to use this help for the specified custom commands as well.
Change directories to a location indicated by a keyword.
- Usage:
yeah goto some_keyword [--set=</your/directory>] [--delete] [--clear] [--list]
- Example:
# Set new keyword: test
yeah goto test --set=/my/path
# Go to keyword: test => cd /my/path
yeah goto test
# Delete keyword: test
yeah goto test --delete
# List all keywords
yeah goto --list
# Delete all keywords
yeah goto --clear
This is designed so that you can save different commands and execute them easily.
You can create a yeah.yml
file and configure it. Under the commands
scope, you can declare commands.
These commands can be run the same way as a regular command. For example, a command named custom_test
can
be run by invoking yeah custom_test
.
- Usage:
yeah some_custom_command [--args] [--to_be_forwarded] [--to_specified_command]
- Example:
# yeah.yml
commands:
install:
desc: install dependencies via npm
run: npm install
$ yeah install # runs: npm install
npm output...
$ yeah install --silent # runs: npm install --silent
# yeah.yml
name: yeah
commands:
# yeah test
test:
run: rake test
# yeah hello
hello:
desc: prints Hello World!
run: echo "Hello world!"
# yeah readme
readme:
desc: An example command printing the readme.
run:
- echo 'Hello there!'
- cat README.md
# yeah rubocop
rubocop:
desc: Runs the rubocop linter
run: rubocop
# yeah calls_another_command
calls_another_command:
desc: This command calls the hello command specific above
run: hello
# yeah invalid
invalid:
desc: Since this command has no run key, it should fail on execution
# yeah another_invalid
another_invalid:
desc: Cannot have nested actions.
run:
test: echo 'This is not allowed'