Method: Shell.default_system_path
- Defined in:
- lib/shell.rb
.default_system_path ⇒ Object
Returns the directories in the current shell’s PATH environment variable as an array of directory names. This sets the system_path for all instances of Shell.
Example: If in your current shell, you did:
$ echo $PATH
/usr/bin:/bin:/usr/local/bin
Running this method in the above shell would then return:
["/usr/bin", "/bin", "/usr/local/bin"]
142 143 144 145 146 147 148 |
# File 'lib/shell.rb', line 142 def default_system_path if @default_system_path @default_system_path else ENV["PATH"].split(":") end end |