sl - A better ls

hakerdefo

We being the terminal junkies use cli environment as much as possible and 'ls' is one of the essential tool we use to list files and directories.
Now here comes 'sl'. I call it a better ls. It's a simple script so nothing to install. Just Download sl and save it somewhere in your $PATH. Also Download sl.tcl, a sample configuration file, and save it with the name '.sl.tcl' in your $HOME directory.

To view the hidden files you'll need to add the following line to the config file '.sl.tcl'

set SWITCH(ignore) 1


And yes 'sl' has a single dependency that you can easily install like this,


sudo apt-get install tcl


That's it! Next time you want to use 'ls' just do 'sl' and I'm confident you'll love it  8)

The original intent of this post is to serve as the place-holder of this wonderful script as the original website is gone!

Cheers!!!
You Can't Always Git What You Want

VastOne

^ Another very nice find..

Couple of things.. The sl script needs to be made an executable and tcl is already standard on VSIDO (just an FYI)

I noticed it does not by default show hidden files.. Is this a config setting to do or are there options with the script?

Great job!   8)

Cheers!
VSIDO      VSIDO Change Blog    

    I dev VSIDO

hakerdefo

#2
Nicely spotted Vasty  8)
By default 'sl' let the hidden files remain, well err, hidden  :D
This is to avoid cluttering the output.

However one can easily override this to view the hidden files. Just add the following to the config file '.sl.tcl'

set SWITCH(ignore) 1


I've added this info to the original post.

Cheers!!!
You Can't Always Git What You Want

VastOne

#3
^ thanks... I added that and resourced bashrc and tried several different lines in the tcl file but am still not seeing hidden files.. it is no worries.. I have a ls alias that does just that for me

One (me) should always check to edit the correct file and not the original downloaded file

Thank you!
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

^ Ignore last post

When editing the correct file, the changes did work!

My bad
VSIDO      VSIDO Change Blog    

    I dev VSIDO

hakerdefo

It happens  :D

And here is some bonus for the fans of aliases  8)
VastOne is one of them  ;)


alias cd='builtin cd "$@"; sl'


Cheers!!!
You Can't Always Git What You Want