Here ya go: Code: $sel = `ls -sl`; select -cl; select $sel; It doesn't invert the selection. Instead, it clears the selection then reselects what you had selected previously. Hopefully it works. :d