If you think the correct spelling of "color" is "colour," then here's a script to make the ls program agree with you:
Code:
#!/usr/bin/perl
foreach(0..$#ARGV) {
last if $ARGV[$_] eq "--";
$ARGV[$_] =~ s/^--colour/--color/;
}
exec("/bin/ls",@ARGV);
Put that in a text file called "ls", make it executable, and put it in your path somewhere before /bin (i.e. before the location of the real ls), and then start a new terminal to allow the path change to take effect.
Now, try ls --colour=yes
Enjoy!
Note: You could make a copy of this script for any other program that takes the --color option, such as grep. If there is demand for it, I will make a generalized script for any executable.
Bookmarks