#!/usr/bin/env swift import Foundation let current = URL(fileURLWithPath: FileManager.default.currentDirectoryPath) let home = FileManager.default.homeDirectoryForCurrentUser let args = Array(CommandLine.arguments.dropFirst()).joined(separator: " ") if current == home { print("git ls-files") } else { print("ag -g \"\" \(args)") }