The * is an extra indication that the execute permission is set and in some terminal emulations, the filename is also shown in green.
l is aliased to ls -alF
type l
l is aliased to `**ls -alF**'
or
command -V l
l is aliased to `**ls -alF**'
That is the reason for the *
ls is aliased to _ls
type ls
ls is aliased to `**_ls**'
or
command -V ls
ls is aliased to `**_ls**'
_ls is function
type _ls
_ls is a function
**_ls** ()
{
local IFS=' ';
command ls** $LS_OPTIONS **${1+"$@"}
}
If you unset _ls like this.
unset **_ls**
type **_ls**
bash: type: **_ls**: not found
$LS_OPTIONS are the options for ls that is defined in that function, that is the reason for the colored green for the executables.
echo **"$LS_OPTIONS"**
-N --color=tty -T 0
In the end what you’re really running is
command ls -N --color=tty -T 0 -LaF
Regardless of what terminal emulator you are using.
For that reason it is often nice to put a (production) program in ~/bin. You can then call it without any path added.
In fact you can create a directory anywhere and put your scripts executable in there, just make sure you add that directory to your PATH.
Lets create a Script directory inside “$HOME”.
mkdir "${HOME}/Scripts"
Then add the code below in your ~/.profile or “${HOME}/.profile”
if -d "${HOME}/Scripts" ]; then
PATH=$PATH:$HOME/Scripts
fi
Finally source it.
source ~/.profile
You can check it now
echo "$PATH"
to find out where the options are defined.
find /etc -type f -exec grep -F '$LS_OPTIONS' {} +
/etc/profile.d/ls.tcsh: setenv LS_OPTIONS "-A -N $LS_OPTIONS -T 0"
/etc/profile.d/ls.tcsh: setenv LS_OPTIONS "-N $LS_OPTIONS -T 0"
/etc/profile.d/ls.tcsh:alias ls 'ls $LS_OPTIONS'
/etc/profile.d/ls.bash: LS_OPTIONS="-A -N $LS_OPTIONS -T 0"
/etc/profile.d/ls.bash: LS_OPTIONS="-N $LS_OPTIONS -T 0"
/etc/profile.d/ls.bash: command ls $LS_OPTIONS ${1+"$@"}
/etc/profile.d/ls.bash: command ls $LS_OPTIONS ${1+"$@"}
/etc/profile.d/ls.bash: *) alias ls='/bin/ls $LS_OPTIONS' ;;
Any ways those are my two cents 