`ls` alternative with useful info and a splash of color 🎨

Overview

dependency status natls

🎨 Natls 🎨

example

Why Natls?

  • Showing file permissions
  • Showing file size
  • Showing the date that the file was modified last
  • Showing the user that the file belongs to
  • Showing the group that the file belongs to
  • An easy to use file search
  • A splash of color to distinguish between files and folders and other file types

Installation

# Through Cargo
cargo install natls

# Through Homebrew
brew install willdoescode/natls/natls

# Through SnapCraft
sudo snap install natls

Usage

natls <flags> <dir>

Understanding permissions output

000 no access
100 read
010 write
001 execute
101 read and execute
110 read and write
011 write and execute
111 read write and execute

Format: user-group-other

User: Read, Write, and Execute

rwxrw----

All Groups: Read, Write, and Execute

rwxrwxrwx

⚠️ Natls is currently not supported on Windows

Comments
  • Error when running nat on unaccessible directory

    Error when running nat on unaccessible directory

    When running nat on a directory the user does not have access to, a rust error occurs instead of a soft app error such as a simple "permission denied". For example:

    ~ natls /path/that/I/dont/have/access/to
    thread 'main' panicked at 'Failed to run natls: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/main.rs:443:8
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    I would expect it to throw a soft and less "intimidating" error such as:

    ~ ls /path/that/I/dont/have/access/to
    ls: /path/that/I/dont/have/access/to: Permission denied
    
    opened by Devnol 17
  • Date and time are zeros

    Date and time are zeros

    See below:

    # davised @ vader in ~/.local/downloads [22:58:17]
    $ natls --version
    natls 2.1.8
    
    # davised @ vader in ~/.local/downloads [22:56:28]
    $ natls -lg
    drwxr-xr-x     4 KB davised davised 00 000 00:00:00 cutadapt-3.1/
    drwxr-xr-x     4 KB davised davised 00 000 00:00:00 ncbi-datasets-pylib-10.1.3/
    drwxr-xr-x     4 KB davised davised 00 000 00:00:00 iqtree-2.0.6-Linux/
    drwxr-xr-x     4 KB davised davised 00 000 00:00:00 iqtree-2.1.1-Linux/
    ...
    
    opened by davised 9
  • Snap release updates

    Snap release updates

    The issue

    The current release on snap does not match the actual version.

    Reproduce

    • install via "sudo snap install natls"
    • check version of nat with "natls --version"

    Things I tried

    • update nat with "sudo snap refresh natls"

    Idea for a fix

    Snap should be integrated into a CI like GitHub Actions, Jenkins or similar to automatically update the binary. Or on each release someone should update the binary manually.

    opened by Witteborn 7
  • Better info description in README

    Better info description in README

    Hi,

    It's good that you updated the README.md for a fresh look. As a user not knowing what natls does, it's not clear what it is, what it does fix and what it's written in (rust) and why.

    Maybe add in the first sentence under the title what natls (an alternative to ls with colors written in rust, being superfast!) or something like that. Maybe add some speed test benchmark natls vs ls and lsd and exa

    You have to sell this program a bit if you want people to use it. Why do they want to use it? :)

    Also, maybe give some examples: natls -l -m shows what the screenshot does, I believe Anyways what do you think?

    opened by qx-775 6
  • thread 'main' panicked at 'called `Option::unwrap()`

    thread 'main' panicked at 'called `Option::unwrap()`

    System Information:

    • macOS Big Sur 11.1

    • MacBook Pro (15-inch, 2018)

    • nat version 2.1.10 (installed via Homebrew)

    Sequence of commands:

    export RUST_BACKTRACE=full To give full details about the crash

    natls
    thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/utils/get_group.rs:6:8
    stack backtrace:
       0:        0x10092860e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3b6ed74a60c4de30
       1:        0x1009576ae - core::fmt::write::h72dd6ddbc116ef3c
       2:        0x100927d1a - std::io::Write::write_fmt::h033803ce14d847cc
       3:        0x10093bb99 - std::panicking::default_hook::{{closure}}::h040276b51a1a4749
       4:        0x10093b8be - std::panicking::default_hook::h2a43ed83163cecb9
       5:        0x10093c12a - std::panicking::rust_panic_with_hook::h15f3dba6c099e04e
       6:        0x100928c99 - std::panicking::begin_panic_handler::{{closure}}::h33fb39231ad9a88d
       7:        0x100928788 - std::sys_common::backtrace::__rust_end_short_backtrace::hd5ec6f84e4df1d34
       8:        0x10093bca3 - _rust_begin_unwind
       9:        0x10095c9cf - core::panicking::panic_fmt::h7889f3b8e7c118f7
      10:        0x10095c927 - core::panicking::panic::h467f1ca176190211
      11:        0x1008be832 - natls::utils::get_group::group::hd7e992d1d04d532e
      12:        0x1008b9ee1 - natls::File::new::h1bc60eb99da8151d
      13:        0x1008c4ade - <core::iter::adapters::ResultShunt<I,E> as core::iter::traits::iterator::Iterator>::next::h724542ea187dcaf1
      14:        0x1008c15be - <alloc::vec::Vec<T> as alloc::vec::SpecFromIter<T,I>>::from_iter::hc2fbc564bc446f30
      15:        0x1008c4f42 - core::iter::adapters::process_results::h67eaf86eb83e6497
      16:        0x1008bb201 - natls::main::h7b891e1e5baa18b7
      17:        0x1008bcada - std::sys_common::backtrace::__rust_begin_short_backtrace::ha85bf5dbd5f6fb8d
      18:        0x1008bcafc - std::rt::lang_start::{{closure}}::he35549e67e86e1ef
      19:        0x10093f22e - std::rt::lang_start_internal::h1881ffd15d3416e4
      20:        0x1008bcaa9 - _main
    

    :information_source: The other nat commands work just fine. The issue happens only with the regular execution, without any parameters.

    opened by glauberl-ciandt 6
  • Alphabetical

    Alphabetical

    Nice little tool!

    I was wondering about the possibility of alphabetising files and folders

    As you can see the files are not ordered which can make it a little cumbersome to use

    Screenshot 2020-11-05 at 11 47 25

    Thanks.

    opened by brenwell 5
  • Can not list root directory /

    Can not list root directory /

    It can not list fs root "/"

    $ nat /
    Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
    

    but

    $ ls /
    Applications	Library		Users		bin		dev		home		private		tmp		var
    EFI-Backups	System		Volumes		cores		etc		opt		sbin		usr
    

    This is on OS X 10.15

    opened by SebastianSchildt 5
  • thread 'main' panicked at 'attempt to subtract with overflow', src/main.rs:76:15

    thread 'main' panicked at 'attempt to subtract with overflow', src/main.rs:76:15

    My Ubuntu rust packages are probably quite old. But I don't think it matters too much.

    tilmanb@zuse:~/git/nat$ RUST_BACKTRACE=1 cargo run
        Finished dev [unoptimized + debuginfo] target(s) in 0.07s
         Running `target/debug/nat`
    thread 'main' panicked at 'attempt to subtract with overflow', src/main.rs:76:15
    stack backtrace:
       0: backtrace::backtrace::libunwind::trace
                 at /usr/src/rustc-1.43.0/vendor/backtrace/src/backtrace/libunwind.rs:86
       1: backtrace::backtrace::trace_unsynchronized
                 at /usr/src/rustc-1.43.0/vendor/backtrace/src/backtrace/mod.rs:66
       2: std::sys_common::backtrace::_print_fmt
                 at src/libstd/sys_common/backtrace.rs:78
       3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
                 at src/libstd/sys_common/backtrace.rs:59
       4: core::fmt::write
                 at src/libcore/fmt/mod.rs:1063
       5: std::io::Write::write_fmt
                 at src/libstd/io/mod.rs:1426
       6: std::sys_common::backtrace::_print
                 at src/libstd/sys_common/backtrace.rs:62
       7: std::sys_common::backtrace::print
                 at src/libstd/sys_common/backtrace.rs:49
       8: std::panicking::default_hook::{{closure}}
                 at src/libstd/panicking.rs:204
       9: std::panicking::default_hook
                 at src/libstd/panicking.rs:224
      10: std::panicking::rust_panic_with_hook
                 at src/libstd/panicking.rs:470
      11: rust_begin_unwind
                 at src/libstd/panicking.rs:378
      12: core::panicking::panic_fmt
                 at src/libcore/panicking.rs:85
      13: core::panicking::panic
                 at src/libcore/panicking.rs:52
      14: nat::main
                 at src/main.rs:76
      15: std::rt::lang_start::{{closure}}
                 at /usr/src/rustc-1.43.0/src/libstd/rt.rs:67
      16: std::rt::lang_start_internal::{{closure}}
                 at src/libstd/rt.rs:52
      17: std::panicking::try::do_call
                 at src/libstd/panicking.rs:303
      18: __rust_maybe_catch_panic
                 at src/libpanic_unwind/lib.rs:86
      19: std::panicking::try
                 at src/libstd/panicking.rs:281
      20: std::panic::catch_unwind
                 at src/libstd/panic.rs:394
      21: std::rt::lang_start_internal
                 at src/libstd/rt.rs:51
      22: std::rt::lang_start
                 at /usr/src/rustc-1.43.0/src/libstd/rt.rs:67
      23: main
      24: __libc_start_main
      25: _start
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    permissions   size      last modified       grouptilmanb@zuse:~/git/nat$
    
    tilmanb@zuse:~/git/nat$ git log -n 1
    commit 6d34b3c80b77f94e2f076158affcb8e6ba8d9b04 (HEAD -> main, origin/main, origin/HEAD)
    Author: Will Lane <[email protected]>
    Date:   Fri Oct 23 00:29:00 2020 -0700
    
        updated colors for users using lighter terminal themes
    
    tilmanb@zuse:~/git/nat$ rustc --version
    rustc 1.43.0
    

    My rust foo is very weak and I didn't have tome to dig into it. But perhaps you want to know.

    Feel free to just close the ticket.

    opened by tbaumann 5
  • Searching for nonexistent file or directory returns Rust error

    Searching for nonexistent file or directory returns Rust error

    OS: macOS 11.1 shell: zsh Terminal: Default Application source: Homebrew Cargo version: 1.49.0

    Running natls nonexistent_file returns the following error:

    thread 'main' panicked at 'called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/utils/get_group.rs:5:53

    bug 
    opened by Devnol 4
  • Does not work with watch

    Does not work with watch

    This is an unusual use case, but sometimes I want to see large files being copied and their size growing.

    I'd love to use watch natls for those times.

    opened by saurabhwahile 4
  • doesn't work for me

    doesn't work for me

    The tool does not work for me. Downloaded and put into /usr/local/bin and changed permissions to 755 When I run it, it just puts lines on my screen. I am using macOS 10.15.7 Bildschirmfoto 2020-10-24 um 22 23 37

    opened by rennefJ 4
Releases(v2.1.14)
Owner
Will
What if the way we perceive a problem is already part of the problem? - Žižek
Will
`nm` and `addr2line` but for DI "debug-info" COFF files

Summary This is a very simple tool that prints out function, global, and source line information from a .dbg "DI" COFF debug file. This can handle bot

null 7 Dec 18, 2022
A super simple prompt for Fish shell, just shows git info and Vi mode.

vifi is a portmandeau of 'Vi' and 'Fish', because it's a prompt for Fish shell, primarily focused around showing proper indicators when using Vi key bindings.

Mat Jones 1 Sep 15, 2022
Services Info Register/KeepAlive/Publish/Subscribe. Based on etcd-rs, tokio

Services Info Register/KeepAlive/Publish/Subscribe. Based on etcd-rs, tokio

Mutalisk 5 Oct 4, 2022
Binary Ninja plugin written in Rust to automatically apply symbol information from split debug info on Linux.

Load Symbols Binary Ninja plugin written in Rust to automatically apply symbol information from split debug info on Linux. Requirements Last tested wi

null 4 Jul 20, 2022
⚡🦀 Yet another rust system info fetcher.

Yarsi: Yet another rust sys info fetcher ✨ Showcase requirements ?? cargo ?? install with $ curl https://sh.rustup.rs -sSf | sh installation ❤️‍?? Ya

BinaryBrainiacs 8 Jan 26, 2023
Blazingly fast interpolated LUT generator and applicator for arbitrary and popular color palettes.

lutgen-rs A blazingly fast interpolated LUT generator and applicator for arbitrary and popular color palettes. Theme any image to your dekstop colorsc

null 12 Jun 16, 2023
A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!

Quickiller There are always programs such as chrome that keep eating up your resources even when closed! The only way to prevent this is to kill all o

Codingsquirrel 1 Dec 8, 2021
Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.

rgb2ansi256 rgb2ansi256 is a small Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and const fn. Th

Linda_pp 7 Nov 17, 2022
Detects whether a terminal supports color, and gives details about that support

Detects whether a terminal supports color, and gives details about that support. It takes into account the NO_COLOR environment variable. This crate i

Kat Marchán 30 Dec 29, 2022
An abstract, safe, and concise color conversion library for rust nightly This requires the feature adt_const_params

colortypes A type safe color conversion library This crate provides many methods for converting between color types. Everything is implemented abstrac

Jacob 13 Dec 7, 2022
A rust crate for working with colors and color spaces.

Color Art A rust crate for working with colors and color spaces. Documentation See Color Art. Usage Add Dependency [dependencies] color-art = "0.2" Co

cx33 5 Dec 30, 2022
Convert your favorite images and wallpapers with your favorite color palettes/themes

dipc doprz' image palette converter Convert your favorite images and wallpapers with your favorite color palettes/themes Color Palettes/Themes catppuc

null 50 Apr 26, 2023
Structopt derived ethers-rs types, useful for building Ethereum CLIs

ethers-structopt Provides ethers-compatible Structopt derives, useful for building Ethereum CLIs. Contributing Pull requests are welcome. For major ch

Georgios Konstantopoulos 6 Dec 27, 2022
Rust command line utility to quickly display useful secrets in a Kubernetes namespace

kube-secrets This is a command line utility for quickly looking at secrets in a Kubernetes namespace that are typically looked at by humans. It specif

Frank Wiles 8 Feb 10, 2022
A collection of semi-useful tools made for GNU/Linux

DECTOOLS A collection of semi-useful tools made for GNU/Linux. Some may work on macOS, though functionality isn't a priority. Depenencies: python, bas

Decator 3 Jun 8, 2022
Tool that was built quickly for personal needs, you might find it useful though

COPYCAT Produced with stable-diffusion Clipboard (copy/paste) history buffer for terminal emulators, MAC OS gui and VIM* environment usage. Rrequireme

Dragan Jovanović 4 Dec 9, 2022
Bruteforce connecting to a specific Sea of Thieves server. Useful if you want to be in the same server as your friends.

SoT Server Finder Find which Sea of Thieves server you're connected to. Useful if you want to be in the same server as your friends. Setup Download so

Martin 4 Mar 19, 2023
This library contains collection of all sorts of useful information for every country.

Keshvar This library contains collection of all sorts of useful information for every country. Package | Documentation | Repository Demo use keshvar::

Pouriya 11 Apr 2, 2023
Really useful hacking tools.

A Remake of Hax in Rust™ - Port-scanner(Powered by nmap) ✅ - URL-Masker ✅ - Phisher(Powered by ZPhisher) ☑️ (WIP ?? ) For Linux Enthusiasts: You need

skyline 4 May 13, 2023