Sample Header Ad - 728x90

Aliases working in subjective conditions on Mac

0 votes
1 answer
107 views
I'm currently working on a dotfiles configuration (which runs zsh) which I've been using on my mini home server and and Linux CLIs on my PC. I've also utilised it on my work Macbook which runs MacOS, but noticed I was running into some weird issues.
(($+commands[terraform])) && {
    alias tf="terraform" 
}
The above code is part of my alias file for zsh, which maps 'tf' to the terraform command. The issue I've been running to is, that this does not work on the Mac terminal; in which I get the "'tf' command not found error" (or along the lines), but does in the VS Code intergrated terminal. Further adding confusion, I have 'g' mapped to git, and it works perfectly on both Mac terminal and VS Code intergrated terminal. Any ideas or help would be great. Thanks
Asked by Maabat (3 rep)
May 12, 2024, 04:05 AM
Last activity: May 13, 2024, 12:30 PM