14 lines
343 B
Plaintext
Executable File
14 lines
343 B
Plaintext
Executable File
#!/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)")
|
|
} |