Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

jamez01/arsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Introduction

Arsh is the Advanced Ruby Shell, and intends to be a pure ruby implementation of the Linux shell. Currently, the shell is capable of running ordinary Linux commands as well as arbitrary Ruby code. Tab complete functionality works as well.

##Installation

gem install arsh

If you use RVM, you will need to run the following script to reconfigure it for RVM, otherwise the shell will only work when spawned by a Bash shell.

arsh_configure_for_rvm

Most flavors of linux will require you to edit /etc/shells to add the new shell before it can be used.

Once that is done, modify your user shell to the new shell, logout, and log back in

##Configuring

Most of the Shell can be configured via 2 files. /etc/arshrc for global configuration, and $HOME/.arshrc. Environment variables can be configured there, as well as global variables and other configuration. An example arshrc configuration file would look as follows

    $ps1="(arsh) " + "<% ENV['USER'] %>@<% `hostname`.chomp %>".console_green.console_bold + "<% Dir.pwd %> $ ".console_blue.console_bold
    alias ls=ls --color
    ENV['PATH'] = "/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.3"
    ENV['HIST_COUNT'] = "1000"
    rvm use 1.9.3

The arshrc files are pure ruby, but multiple line evaluation is not currently possible.

Color prompts are done via a monkey patch to the String class so as to not break line breaking.

About

Advanced Ruby Shell (BASH like replacement)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages