Skip to content

Commit

Permalink
Merge pull request #29 from FeiYao-Edinburgh/patch-2
Browse files Browse the repository at this point in the history
Improve `ls` command
  • Loading branch information
JiaweiZhuang committed Sep 20, 2019
2 parents d4a8bd0 + 00a9270 commit 28d9d67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build_environment/GC-classic/bashrc/personal
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ function cdls() {
# first do 'cd'
command cd $@ #'command' ensures we use original 'cd'
# then do 'ls'
nfiles=$(ls -1 | wc -l) # how many files
nfiles=$(ls | wc -l) # how many files
if [ $nfiles -lt 60 ] # list all files if not too many
then
ls
else
ls | head -n 4
echo $nfiles ' files in total, only list a few'
echo $nfiles 'files in total, only list a few'
fi
}

0 comments on commit 28d9d67

Please sign in to comment.