Skip to content
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
Open

Add -a Option to list.lua #498

wants to merge 1 commit into from

Conversation

@JakobDev
Copy link
Contributor

@JakobDev JakobDev 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.

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
Copy link
Contributor

@dmarcuse 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
Copy link
Contributor

@SquidDev 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
Copy link

@thatcraniumguy 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.