Fügen Sie Folgendes zu Ihrem hinzu ~/.bash_profile
:
function cd { # actually change the directory with all args passed to the function builtin cd "$@" # if there's a regular file named "todo.txt"... if [ -f "todo.txt" ] ; then # display its contents cat todo.txt fi }
Möglicherweise haben Sie bereits eine ähnliche Funktion für cd
- erweitern Sie diese einfach, um den Inhalt zu drucken, todo.txt
falls vorhanden.