0

I have a directory on my machine, ~/Code. I have an alias, code, that takes me to that directory. I have just installed VS Code, which uses the command code to open. I would love to keep my old alias the way it is, and open VS Code with something like vs. Can this be done? I tried aliasing vs to code and code to cd ~/Code, but of course this just ended up linking my aliases together so they both do the same thing.

David Kennell
  • 155
  • 2
  • 5
  • Related: [Run a command that is shadowed by an alias](https://unix.stackexchange.com/questions/39291/run-a-command-that-is-shadowed-by-an-alias) – steeldriver May 06 '20 at 20:38

1 Answers1

2

You can distinguish between both like this:

alias vs='command code'
Hauke Laging
  • 88,146
  • 18
  • 125
  • 174