New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -a Option to list.lua #498

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@Wilma456
Contributor

Wilma456 commented Dec 4, 2017

This PR simple adds a -a Option to list.lua which allows you to see hidden Files, even if the list.show_hidden setting is false.

Add -a Option to list.lua
This PR simple adds a -a Option to list.lua which allows you to see hidden Files, even if the list.show_hidden setting is false.
@KnightMiner

This comment has been minimized.

This is minor, but bShowHiddenOption should be before the string.sub as it's the faster condition (shortcircuiting will mean we never need the strong.sub call then)

@SquidDev

This comment has been minimized.

I feel it'd be good to support ls foo -a as well. Maybe do something like

local sDir = shell.dir()
local bShowHiddenOption = false
for i = 1, #tArgs do
  if tArgs[i] == "-a" then
    bShowHiddenOption = true
  else
    sDir = tArgs[i]
  end
end
@dmarcuse

This comment has been minimized.

Contributor

dmarcuse commented Dec 4, 2017

What happens if you want to list files in the -a directory? You'd have to do ls -a -a for it to work, which would also show hidden files when you might not want them, or cd -a and then ls, which adds an extra command.

@SquidDev

This comment has been minimized.

Contributor

SquidDev commented Dec 4, 2017

@apemanzilla I believe you can just do ls ./-a then: that's what one does on Linux at least.

@thatcraniumguy

This comment has been minimized.

thatcraniumguy commented May 23, 2018

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment