Project

eggsh

0.0
No commit activity in last 3 years
No release in over 3 years
Use Ruby expressions instead of unfriendly shell script
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.0.0
~> 1.5.2
>= 0

Runtime

 Project Readme

eggsh¶ ↑

An interactive shell with Ruby power

Synopsis¶ ↑

If we want to delete all the files except files with *.c extensions, we have to do this in base:

ls | grep -v *.c | xargs rm -rf

The solution is not so obvious , and it requires the knowledge of the tools like grep, sed, awk, xargs … etc. If ruby expressions are available in the command line environment, things will be much easier:

rm -rf { ls['*'] - ls['*.c'] }
# ruby expression inside {}

Usage¶ ↑

gem install eggsh

Call ‘eggsh’ to start the shell. Settings of the shell are placed under ~/.eggshrc.

{ } brackets are used to evaluate ruby expressions. {? } brackets are used to evaluate ruby expressions, too, except for the output will not be executed.

Example¶ ↑

Making every files without extension excutable:

chmod +x { ls - ls['*.*'] }

Copyright © 2011 Andrew Liu. See LICENSE.txt for further details.