summaryrefslogtreecommitdiff
path: root/Userland/ls.cpp
AgeCommit message (Collapse)Author
2020-08-12Userland: Mark compilation-unit-only functions as staticBen Wiederhake
This enables a nice warning in case a function becomes dead code.
2020-08-05Unicode: Try s/codepoint/code_point/g againNico Weber
This time, without trailing 's'. Ran: git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05Revert "Unicode: s/codepoint/code_point/g"Nico Weber
This reverts commit ea9ac3155d1774f13ac4e9a96605c0e85a8f299e. It replaced "codepoint" with "code_points", not "code_point".
2020-08-03Unicode: s/codepoint/code_point/gAndreas Kling
Unicode calls them "code points" so let's follow their style.
2020-06-17Userland: Use Core::File::read_link()Sergey Bugaev
2020-06-08ls: Emit plain text when output is not a ttyAnotherTest
2020-05-23Kernel+LibC: Fix various build issues introduced by ssize_tAndreas Kling
Now that ssize_t is derived from size_t, we have to
2020-05-17ls: Make column alignment Unicode-aware :^)Andreas Kling
You can now have emojis in file names and they will line up correctly in "ls" output.
2020-05-10ls: Emit hyperlinks for files outside the current directoryAndreas Kling
2020-05-09ls: Make filenames in the output hyperlinkedAndreas Kling
This allows you to Ctrl+Click in Terminal to open files in "ls" output.
2020-04-25 Userland/ls: Remove unnecessary outputHüseyin ASLITÜRK
2020-04-14Kernel: Don't include null terminator in sys$readlink() resultSergey Bugaev
POSIX says, "Conforming applications should not assume that the returned contents of the symbolic link are null-terminated." If we do include the null terminator into the returning string, Python believes it to actually be a part of the returned name, and gets unhappy about that later. This suggests other systems Python runs in don't include it, so let's do that too. Also, make our userspace support non-null-terminated realpath().
2020-03-03AK: Make quick_sort() a little more ergonomicAndreas Kling
Now it actually defaults to "a < b" comparison, instead of forcing you to provide a trivial less-than comparator. Also you can pass in any collection type that has .begin() and .end() and we'll sort it for you.
2020-02-25AK: Make Vector use size_t for its size and capacityAndreas Kling
2020-02-11Userland: Use Core::DateTimeAndreas Kling
2020-02-06LibCore: Remove leading C from filenamesAndreas Kling
2020-02-02LibCore: Put all classes in the Core namespace and remove the leading CAndreas Kling
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
2020-01-28Userland+Terminal: Port to new CArgsParser APISergey Bugaev
While at it, also add some niceties and fix some things.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2020-01-17Userland: Print which path we failed to lsSergey Bugaev
2020-01-15Userland/ls: escape non-printable charactersjoshua stein
Fixes #1044
2020-01-13ls: Use pledge()Brian Gianforcaro
2020-01-11ls: Cache the user and group names instead of looking up every timeAndreas Kling
2020-01-09ls: Widen the user and group fields a little bitAndreas Kling
I didn't like looking at /tmp/portal now that lookup:lookup owns one of the sockets there :^)
2020-01-05ls: Display SUID files with red background colorAndreas Kling
2020-01-04ls: Show directories with the sticky bit in a special colorAndreas Kling
This makes /tmp show up with a green background in "ls" output.
2019-12-09AK: Use size_t for the length of stringsAndreas Kling
Using int was a mistake. This patch changes String, StringImpl, StringView and StringBuilder to use size_t instead of int for lengths. Obviously a lot of code needs to change as a result of this.
2019-10-19ls: Fix alignment of device files in long mode (ls -l)Andreas Kling
2019-10-19ls: Add -t and -r flagsAndreas Kling
-t: Sort by modification time (default is to sort by name) -r: Reverse sort order Note that these only apply when used together with -l (long mode.)
2019-09-11ls: Add -h (human readable) output switchAndreas Kling
Fixes #543.
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-08-20ls: Sort the output alphabeticallyAndreas Kling
Also use StringBuilder to construct the full relative paths, to get rid of an unnecessary and suspicious-looking buffer.
2019-08-20ls: Don't layout or colorize output if stdout is not a TTYAndreas Kling
2019-08-20Userland: ls division by zero.marprok
When the terminal app window became smaller than the longest filename, a division by zero occured while calculating the offset.
2019-08-19Userland: Improved the printing of the ls command. (#468)Marios Prokopakis
The ls command takes into consideration the length of the largest filename when it prints a line. Fixes #432.
2019-07-21ls: Don't print an empty line if there were no files to show.Andreas Kling
Fixes #352.
2019-06-22Userland: Fix more compiler warnings.Andreas Kling
2019-06-07Userland: Run clang-format on everything.Andreas Kling
2019-06-01ls: Show user name and group name if available. (#151)Mustafa
Fixes #150
2019-05-27LibCore: Add CDirIterator, and use it in everything rather than readdirRobin Burchell
2019-05-27ls: Fix build and tidy up coding style.Andreas Kling
2019-05-27Ls: Cleanupfaissaloo
2019-05-27Ls: Support multiple filesfaissaloo
2019-05-27Ls: Support single files in long modefaissaloo
2019-05-27Ls: Refactor long directory listingsfaissaloo
2019-05-27Ls: Add single file support in short modefaissaloo
2019-04-20Sprinkle use of AK::Vector in various places.Andreas Kling
Some of these are less helpful than others. Avoiding a bunch of mallocs in the event loop wakeup code is definitely nice.
2019-02-27Userland: /bin/ls should show major,minor for block devices.Andreas Kling
2019-02-25More moving towards using signed types.Andreas Kling
I'm still feeling this out, but I am starting to like the general idea.
2019-02-22Userland: Fix two compiler warnings.Andreas Kling