Remove zshrc post-install inserts

This commit is contained in:
Nanda Lopes
2020-11-08 21:06:34 -03:00
parent ff029a2058
commit 72446c046a

View File

@@ -321,18 +321,6 @@ def install_files(files, method = :symlink)
run %{ cp -f "#{source}" "#{target}" } run %{ cp -f "#{source}" "#{target}" }
end end
# Temporary solution until we find a way to allow customization
# This modifies zshrc to load all of yadr's zsh extensions.
# Eventually yadr's zsh extensions should be ported to prezto modules.
source_config_code = "for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file"
if file == 'zshrc'
File.open(target, 'a+') do |zshrc|
if zshrc.readlines.grep(/#{Regexp.escape(source_config_code)}/).empty?
zshrc.puts(source_config_code)
end
end
end
puts "==========================================================" puts "=========================================================="
puts puts
end end