Hacker News new | ask | show | jobs
by thunderbong 1889 days ago

  # create a directory in the current directory and cd to it

  function mkcd() { mkdir -p "$@" && eval cd "\"\$$#\""; }
1 comments

Why the eval? This works fine for me:

  mkcd(){ mkdir --parents -- "$@" && cd -- "$@"; }