va.gaidenko
va.gaidenko

Reputation: 21

zsh: unknown file attribute in Mac OS

I get an error with alias:

ln -s (which nvim) /opt/homebrew/bin/vim

zsh: unknown file attribute: h

terminal img

Upvotes: 1

Views: 5011

Answers (1)

James Risner
James Risner

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

Related Questions