Created
August 4, 2009 06:57
-
-
Save tmaeda/161065 to your computer and use it in GitHub Desktop.
bash cd alias
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# どうせcdした後はlsも打つんでしょ? | |
# => .bashrc などに以下を記述。 | |
function cd() { | |
builtin cd "$@" | |
#ls -lrt | |
ls | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ディレクトリの中にめちゃめちゃ大量にファイルが入っている場合があって、
そういうときにまで毎度毎度lsされるのはウザい、という要望があったので、
こんな感じのを考えてみた。
buf=
ls
if [ ${#buf} -lt 1000 ]; then
ls
fi