Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not hard to fix:

  if command -v exa &> /dev/null; then
      alias ls='exa'
  fi


I do it differently. It supports not having to reload aliases after installing.

    alias vim='$(command -v nvim || echo vim)'


Checking everytime you use the alias, instead on when you init the shell. How often do you need to install a packages?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: