From 2948545ace2a5d9aa0389eaba3f6f1b0e83cd1cd Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sat, 6 Jan 2024 11:46:29 +0000 Subject: darwin/zsh: Only use some GNU tools by default --- dotfiles-darwin/zsh/profile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dotfiles-darwin/zsh/profile b/dotfiles-darwin/zsh/profile index 35e5d91..7358caa 100644 --- a/dotfiles-darwin/zsh/profile +++ b/dotfiles-darwin/zsh/profile @@ -1,8 +1,9 @@ # -*- mode: shell-script -*- +# Use some GNU tools by default. () { - local dir - for dir in /usr/local/opt/*/libexec/gnubin(N); do - [[ -d ${dir} ]] && path=(${dir} ${path}) + local cmd + for cmd in cksum sed tar; do + (( ${+commands[g${cmd}]} )) && alias ${cmd}=g${cmd} done } -- cgit v1.2.3-70-g09d2