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

${VARIABLE:-value} expands to the contents of $VARIABLE, if it exists, or to "value" otherwise. In this case value is ":", a bash builtin that does nothing. Effectively, the above sets PROMPT_COMMAND to run the autojump command, then to run the pre-existing PROMPT_COMMAND, if any, or a no-op.


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: