Skip to content

Commit

Permalink
Set MANPATH and INFOPATH.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus authored May 16, 2024
1 parent c314cde commit e534f88
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/tasks/brew.rake
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ namespace :brew do
add_line_to_file bash_environment, "[[ \":$PATH:\" =~ :#{bin}: ]] || " \
"export PATH=#{bin}:\"$PATH\""
end
{
'MANPATH' => File.join(brew_prefix, 'share/man'),
'INFOPATH' => File.join(brew_prefix, 'share/info'),
}.transform_values(&:shellescape).each do |var, path|
add_line_to_file fish_environment, "set -q #{var}; and set #{var} ''; " \
"contains #{path} $#{var}; " \
"or set -x #{var} #{path} $#{var}"
end

brew_repo_dir = capture('brew', '--repository').chomp
brew_repo_remotes = capture('git', '-C', brew_repo_dir, 'remote').lines.map(&:chomp)
Expand Down

0 comments on commit e534f88

Please sign in to comment.