lib/rash.rb
def sourcesh(file) 
  bash_env = lambda do |cmd = nil|
    tmpenv = `#{cmd + ';' if cmd} printenv`
    tmpenv.split("\n").grep(/[a-zA-Z0-9_]+=.*/).map {|l| l.split("=")}
  end
  bash_source = lambda do |f|
    Hash[bash_env.call("source #{File.realpath f}") - bash_env.()]
  end

  bash_source.call(file).each {|k,v| ENV[k] = v if k != "SHLVL" && k != "_"}
end
# Defines `bash` psuedo-compatibility. Filesystem effects happen like normal 
# and environmental variable changes are copied
#
# This is an artifact of an old design and is deprecated until further notice.
Defines `bash` psuedo-compatibility. Filesystem effects happen like normal
and environmental variable changes are copied

This is an artifact of an old design and is deprecated until further notice.
Defines ` bash ` psuedo - compatibility . Filesystem effects happen like normal and environmental variable changes are copied This is an artifact of an old design and is deprecated until further notice .
def sourcesh(file) 
  bash_env = lambda do |cmd = nil|
    tmpenv = `#{cmd + ';' if cmd} printenv`
    tmpenv.split("\n").grep(/[a-zA-Z0-9_]+=.*/).map {|l| l.split("=")}
  end
  bash_source = lambda do |f|
    Hash[bash_env.call("source #{File.realpath f}") - bash_env.()]
  end
  bash_source.call(file).each {|k,v| ENV[k] = v if k != "SHLVL" && k != "_"}
end
def sourcesh ( file ) bash_env = lambda do | cmd = nil | tmpenv = ` #{ cmd + ';' if cmd }  printenv ` tmpenv . split ( "\n" ) . grep ( / [a-zA-Z0-9_]+=.* / ) . map { | l | l . split ( "=" ) } end bash_source = lambda do | f | Hash [ bash_env . call ( "source #{File.realpath f}" ) - bash_env . ( ) ] end bash_source . call ( file ) . each { | k , v | ENV [ k ] = v if k != "SHLVL" && k != "_" } end
Defines `bash` psuedo-compatibility.
Defines ` bash ` psuedo - compatibility .
file