Skip to content
This repository was archived by the owner on Mar 10, 2022. It is now read-only.

Add zsh support for direnv #24

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beak.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public func link() throws {

for bashConfigFile in [".bash_profile", ".bashrc", ".profile"] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to add the zsh configuration file to the array here. It should be created if not already existent.

let bashConfigUrl = URL(fileURLWithPath: NSHomeDirectory()).appendingPathComponent(bashConfigFile)
let direnvLine = "eval \"$(direnv hook bash)\""
let direnvLine = "eval \"$(direnv hook $SHELL)\""

if !FileManager.default.fileExists(atPath: bashConfigUrl.path) {
FileManager.default.createFile(atPath: bashConfigUrl.path, contents: nil)
Expand Down