Skip to content

hikire/sebas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Oct 8, 2018
83dd286 · Oct 8, 2018

History

13 Commits
Oct 7, 2018
Oct 6, 2018
Oct 7, 2018
Oct 8, 2018
Oct 8, 2018
Oct 8, 2018
Oct 7, 2018

Repository files navigation

Sebas

Create aliases to commands or tasks(JS/Sh files) using files.

Installation

# For npm users
npm i -g sbas
# For yarn users
yarn global add sbas

Usage

Create a .sebas folder in your $HOME directiory. Then add your commands by creating files that has the shortcut name and contain the intended command:

echo "rpm-ostree status" > status

Then use it anywhere like this:

sbas status

If the command isn't found inside .sebas folder, sebas will try to run the command as is:

sbas ls # where ls command isn't inside .sebas folder
# will show files like ls does

Using folders to group commands

mkdir os && cd os
echo "rpm-ostree status" > status

and use it like this:

sbas os status

JS tasks

you can add js files inside .sebas they will be executed when called:

echo "console.log(\"Hi :)\")" > hi.js

and use it like this:

sbas hi
Hi :)

sh files

you can run sh files the same way as js ones:

# inside .sebas folder
echo "touch hi.js && ls" > yo.sh

and use it like this:

sbas yo
hi.js # etc...

Change .sebas directory

Add an environmental variable called SEBAS_DIR it will be used by default.

Contributing

  1. Fork it!
  2. Create your feature branch (git checkout -b my-cool-feature)
  3. Commit your changes (git commit -am 'add my feature')
  4. Push to the branch (git push origin my-cool-feature)
  5. Create a new Pull Request