My lack of desire to learn bash scripting has resulted in today's script.
This script will take your current terminal window and spawn a new one with your entire environment copied. paste_env will also, as a side effect, leave a file called /pasted_env.
shell_here
#!/bin/shenv | pbcopy
osascript <<END
tell app "Terminal" to do script "$(paste_env)"
END
paste_env
#!/usr/bin/env ruby
`pbpaste`.each { |var|
puts var }
puts 'clear'
This opens up a previously locked door for Ruby scripting: affecting the current shell.
No comments:
Post a Comment