Giter VIP home page Giter VIP logo

ls_extended's Introduction

About Me

Systems developer, absolutely adore creating low-level software ๐Ÿ˜. Currently working primarily on programming language development ๐Ÿ˜‹.

Check out my languages here:

Love me some Linux and trying various Linux distributions (Arch and Gentoo are โค๏ธ, NixOS is quite fascinating ๐Ÿคฉ).

ls_extended's People

Contributors

davidbittner avatar drmaxnix avatar electrux avatar firebolt55439 avatar jhonnold avatar kaosatha avatar lukasbindreiter avatar mat1g3r avatar maxkatzmann avatar nea89o avatar neui avatar pczajkowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ls_extended's Issues

Feature request: Trim some whitespace to make output more compact

First of all, thank you for writing ls_extended. It makes the ls output both nicer to look at and more efficient to work with!

This is ls_extended compared to regular ls

image

Would it be possible to have less space around the username and the group? And also around the hard link count. When working in a split screen I often get files wrapping to the next line when they would easily have fit on one line had the output just been a bit more compact (more like the regular ls output)

Using actual /bin dir

Not an issue just a question. Instead of building this in the repo's bin dir. Is there a way to make this install it in the actual /bin. dir? Am I able to just move the ls_extended dir that was generated into /bin or does it need more work and configuration for that to work.

memory leak

$ uname -a
Linux 505cf5a8c892 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ ./ls_extended
๏…œ ls_extended

It will be memory leak. sink is in src/vec.c:37.

The problem is when i go to if( flags & OPT_V )... else{}, the else is only return not free, so that memory leak.
Maybe the solution is add vec_destroy( & locs ); in main.c:54
thank you!

Seg Fault on Cyclical SymLink

Issue:

A symlink that points to itself causes a seg fault. I had this occur while changing some dotfile configurations.

Way to reproduce:

Create a file, create a symlink to that file, delete the file and rename the symlink to the name of the original file, keeping it in the original directory. This creates a symlink that points to itself.

Obviously this isn't really that big of a deal considering this shouldn't happen in the first place. But it should probably be accounted for so that you can be aware that you even have one in the first place.

Update NerdFont Icon Codepoints

Some of the hard-coded unicode codepoints have changed or were removed (eg. \uf7a3 aka. the github icon). These should be replaced with working codepoints.

image

Filenames with CR's cause alignment problems

Google Drive (now Google Backup and Sync) creates files named "Icon\r" in each folder that is synced. When displayed via ls, it simply lists "Icon?". However, when using ls_extended, it outputs a "\r", causing rather severe alignment/spacing issues as you might imagine, since the cursor goes to the beginning of the line. I worked around the issue by adding a strncmp check for "Icon\r" files and ignoring them in this line, but that is a stopgap measure at best. You may wish to consider simply stripping CR characters or, as ls does, outputting '?' instead.

Alignment with variant length of group name

If the group name length one is <8, another one is >8. The tab alignment is not working, it will output like:

 -rw-r-----     1       qqldd      self     54B     May 26 06:53    ๎ž•  configs_dir.sh
 drwxr-x---     2       qqldd      longnamegroup    4096B   Jun 12 18:30    ๏ผ  crontab

More sorting options?

This looks really fantastic! Just installed today... Really a brilliant idea!

Curious if you've considered supporting some of the GNU ls sort options?

Personally the ones I use all the time are:

lsdate=ls -tr # sort by modified time, newest last (since -r reverses list)
lssize=ls -Sr # sort by size, largest last
lstype=ls -X # sort by extension... would be cooler than ever with icons!

Reference:

       -t     sort by modification time, newest first
       -S     sort by file size, largest first
       -X     sort alphabetically by entry extension
       -r, --reverse
              reverse order while sorting

ISO date format

Please add support for ISO 8601 date format. In regular ls, this is enabled with --time-style=long-iso. Below I have pasted an example what happens currently with regular ls and ls_extended.

~/test
โฏ /usr/bin/ls -l --time-style=long-iso
total 0
-rw-r--r-- 1 reekymarko users 0 2018-09-30 17:32 file1
-rw-r--r-- 1 reekymarko users 0 2018-09-30 17:32 file2

~/test
โฏ /usr/bin/ls_extended -l --time-style=long-iso
 4063667     -rw-r--r--		1	reekymarko	users	0B	Sep 30 15:32	๏…œ file1
 4063668     -rw-r--r--		1	reekymarko	users	0B	Sep 30 15:32	๏…œ file2

Make another release

There are nine bugfixes since version 1.0.0. I think you should consider making another release.

ls_extended * problem

I have two problems:

  1. ls_extended file.* returns " "Unable to open directory: file.txt/"
  2. ls_extended * returns the last file from ls *

undefined reference to `dirname_r'

Ubuntu 20.04 LTS, ./build.sh:

/usr/bin/ld: buildfiles/src/ls.c.o: in function `get_stats':
ls.c:(.text+0x5c5): undefined reference to `dirname_r'

Reconsider icon assignment for json

What's the idea behind assigning .json files ๏ฌฅ U+FB25 HEBREW LETTER WIDE LAMED?

FWIW the lsd project uses ๎˜‹ U+E60B.

EDIT: I see at the Nerd Fonts site that they indeed use fb25 as nf-mdi-json as well as e60b as nf-seti-json. I have a preference for the latter as it's in the private use area, while the former is part of an alphabet.

But I understand most users will have nerd-patched fonts, and get it if this is rejected if fb25 is generally preferred.

`gcvt` not present on some OS's

ls_extended calls gcvt at src/core.c:120. On some OS's (FreeBSD for instance) gcvt is unavailable. Is there any reason gcvt is used over snprintf? I have a fork with the change made, if this is something that would be considered for merging?

ls_extended Behavior with sudo cp Results in Unexpected Output

I've noticed an unexpected behavior with the ls_extended binary when it's copied to /usr/local/bin/ls using the sudo cp command. Instead of behaving like the standard ls command, it outputs the contents of a folder as if it was invoked with the -l option.

Steps to Reproduce:

Download and compile the ls_extended binary.
Copy the ls_extended binary to /usr/local/bin/ls using the following command:

sudo cp ls_extended /usr/local/bin/ls

Navigate to a directory with subdirectories and files.
Run the ls command in the directory.
Observe the output, which is different from the expected behavior of the standard ls command.

Expected Behavior:
The ls command, when invoked after copying ls_extended to /usr/local/bin/ls, should display a basic list view of files and directories, similar to the standard ls command, without the -l option.

Actual Behavior:
The ls command, after copying ls_extended to /usr/local/bin/ls, is displaying the contents of a folder as if it was invoked with the -l option, which includes detailed information about files and directories.

Additional Information:

ls_extended Version:  1.0
Operating System: linux mint

Screenshots/Additional Context:

image
Note: Please let me know if there is any specific configuration or behavior-related information that would help diagnose and resolve this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.