Implement source functionality based on current shell