Advertisement
jay_lltv

bash cd function

Oct 22nd, 2022
828
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.16 KB | None | 0 0
  1. function cd() {
  2.     new_directory="$*";
  3.     if [ $# -eq 0 ]; then
  4.         new_directory=${HOME};
  5.     fi;
  6.     builtin cd "${new_directory}" && /bin/ls --color
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement