Skip to content

Commit

Permalink
capture fish config file
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartjash committed Oct 17, 2023
1 parent 3ca02f2 commit 94a90ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions artifacts/ShellHistoryAndProfiles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BashProfiles: ArtifactsModule {

let userFiles = [ ".bash_history", ".bash_profile", ".bashrc", ".bash_logout",
".zsh_history", ".zshenv", ".zprofile", ".zshrc", ".zlogin", ".zlogout",
".sh_history"
".sh_history", ".config/fish/config.fish"
]

let globalFiles = ["/etc/profile", "/etc/zshenv", "/etc/zprofile", "/etc/zshrc", "/etc/zlogin", "/etc/zlogout"]
Expand All @@ -31,7 +31,7 @@ class BashProfiles: ArtifactsModule {
for filename in userFiles {
let path = URL(fileURLWithPath: "\(user.homedir)/\(filename)")
if (filemanager.fileExists(atPath: path.path)) {
let newFileName = "\(user.username)_\(filename)"
let newFileName = "\(user.username)_\(filename.replacingOccurrences(of: "/", with: ""))"
self.copyFileToCase(fileToCopy: path, toLocation: self.profilesDir, newFileName: newFileName)
}

Expand Down

0 comments on commit 94a90ec

Please sign in to comment.