Reputation: 21
I get an error with alias:
ln -s (which nvim) /opt/homebrew/bin/vim
zsh: unknown file attribute: h
Upvotes: 1
Views: 5011
Reputation: 6074
ln -s "`which nvim`" /opt/homebrew/bin/vim
You need to use double quotes around the which command if the result has spaces. The other form also works:
ln -s "$(which nvim)" /opt/homebrew/bin/vim
An additional way (from Martin Tounoij) is to use equal to expand:
ln -s =nvim /opt/homebrew/bin/vim
Upvotes: 2