Class: Picobox::Shell::Bash

Inherits:
StartupScript show all
Defined in:
lib/picobox/shell/bash.rb

Instance Attribute Summary

Attributes inherited from StartupScript

#os

Instance Method Summary collapse

Methods inherited from StartupScript

get, #initialize, #install_extensions, #uninstall_extensions

Constructor Details

This class inherits a constructor from Picobox::Shell::StartupScript

Instance Method Details

#filenameObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/picobox/shell/bash.rb', line 4

def filename
  [
    '.bashrc',
    '.bash_profile',
    '.bash_login',
    '.profile'
  ].map do |script|
    Pathname.new("#{os.home_dir}/#{script}")
  end.select do |file|
    file.exist?
  end.first.to_path
end