Live data from Hacker News

Eza: A modern, maintained replacement for ls

github.com

151–160 of 250 posts

Re: Eza: A modern, maintained replacement for ls

#152

Earlier quoted context omitted.

You can hover over the date for an exact timestamp. Maybe someone can write a userscript to replace the relative dates to exact ones.

This bookmarklet (I prefer to do it on purpose, not by default) would do this on a GitHub page. It is easy to convert it to a userscript. javascript:(function () { document.querySelectorAll("relative-time").forEach(function (el) { var p = el.parentNode; var t = el.title; var s = document.createElement("span"); s.innerHTML = t; p.removeChild(el); p.appendChild(s); }); })();

Shorter version

javascript:(()=> {document.querySelectorAll("relative-time").forEach((el)=> el.format="datetime")})()

based on docs at https://github.com/github/relative-time-element

you can also do other formats like

document.querySelectorAll("relative-time").forEach((el)=> {el.format= "datetime"; el.year ="numeric"; el.weekday=undefined;})

Re: Eza: A modern, maintained replacement for ls

#153

Earlier quoted context omitted.

Look at the title above. It only says Eza and ls. It says eza is maintained, which tells me the other,ls, is not maintained. Doesn’t mention exa. Yes it’s missing nuance if you don’t click through, but that’s a complete statement, and I wouldn’t expect people to click through to get more context

Side note: the English language is a dumpster fire, and it’s easy for these issues to happen.

Absolutely nothing in the confusion here is specific to English.

I don't know why you would try to take this opportunity to criticize English when this misunderstanding could be present in literally every other language.

Because there is nothing whatsoever here that is a case of linguistic confusion or vagueness -- it is a conceptual issue of comparing two items, applying an adjective to one, and leaving the reader to wonder what that implies about the other item.

And no, English is not a "dumpster fire". Every language has its pros and cons. But there is no language on Earth that is a "dumpster fire". There is absolutely nothing productive or good that can come out of blanket, utterly unfounded statements like that.

Re: Eza: A modern, maintained replacement for ls

#154

Earlier quoted context omitted.

Yeah this makes it better, but I've found some sites that don't do that, blogs and news articles where it's impossible to find the date of published... Is it a SEO trick to make your content always relevant?

Well it will definitely help with caching. You only need to update the article every year or so.

That's still more than just using an exact date that never needs to be updated. Also that seems like something you would do client side anyway. ie. you send a timestamp that never changes and then have the client convert it to "X years/days ago."

Re: Eza: A modern, maintained replacement for ls

#155

Earlier quoted context omitted.

Nice tip. What got rid of most of my use of `ls` in fish was running `ls` automatically when you changed directories: function ls_on_cd --on-variable PWD ls end

I do the same in bash, but it's a bit wordier: _chpwd_hook() { if [[ "$PWD" != "$PREVPWD" ]]; then ls PREVPWD="$PWD" fi } PROMPT_COMMAND=(_chpwd_hook) Goes well with shopt -s autocd alias r='cd -'

Not strictly equivalent, but shorter (and should work with multiple shells):

  $ cd() { builtin cd $* && ls; }
  $ cd /
  bin  boot cdrom  dev  etc  home  lib  lib64 [...]

Re: Eza: A modern, maintained replacement for ls

#156

There is also 'lsd' but I still prefer eza. For everyone interested there is a lot of modern command line tools I nowadays prefer over the old stuff: bat - cat with highlight difftastic - better diff gdu - ncdu for ssds (disk space analyser) zoxide - modern cd fd - find alternative rg - ripgrep (grep) fzf - fuzzy finder jless - json viewer with mouse folding dra - download and install release assets lazygit - git TUI…

I use du-dust over gdu, but otherwise my list is almost identical to yours.

Re: Eza: A modern, maintained replacement for ls

#157

One pet peeve of mine is "human readable dates", especially for a directory listing. If I'm scanning for something I copied into a folder yesterday amongst other things, I don't want everything to show "1 day ago" if I'm looking for something I did around 11am. I want the dates and times. That goes for forums like HN. Show me the date/time and also "7 hours ago" or whatever if you have to. I've never understood takin…

I agree. GitHub does this too on commits. "foo.cpp modified last year." It makes no sense, at least without the ability to view additional datetime information.

So annoying, I wrote this extension some time ago to get rid of relative dates in github

https://addons.mozilla.org/en-US/firefox/addon/yyyy-mm-dd-gi...

Re: Eza: A modern, maintained replacement for ls

#158

There is also 'lsd' but I still prefer eza. For everyone interested there is a lot of modern command line tools I nowadays prefer over the old stuff: bat - cat with highlight difftastic - better diff gdu - ncdu for ssds (disk space analyser) zoxide - modern cd fd - find alternative rg - ripgrep (grep) fzf - fuzzy finder jless - json viewer with mouse folding dra - download and install release assets lazygit - git TUI…

4 additional tools I use regularly:

- task, a Makefile alternative

- hyperfine, a benchmark tool

- vegeta, a load testing tool

- sd, a better, more intuitive sed

There’s also the JSON trinity:

- jq, the well know JSON processor

- jc, convert the output of many CLI tools to JSON

- gron, make JSON greppable

Re: Eza: A modern, maintained replacement for ls

#159

There is also 'lsd' but I still prefer eza. For everyone interested there is a lot of modern command line tools I nowadays prefer over the old stuff: bat - cat with highlight difftastic - better diff gdu - ncdu for ssds (disk space analyser) zoxide - modern cd fd - find alternative rg - ripgrep (grep) fzf - fuzzy finder jless - json viewer with mouse folding dra - download and install release assets lazygit - git TUI…

This link also has a large list of additional tools I hadn't heard of but look interesting.

https://github.com/ibraheemdev/modern-unix

Re: Eza: A modern, maintained replacement for ls

#160

One pet peeve of mine is "human readable dates", especially for a directory listing. If I'm scanning for something I copied into a folder yesterday amongst other things, I don't want everything to show "1 day ago" if I'm looking for something I did around 11am. I want the dates and times. That goes for forums like HN. Show me the date/time and also "7 hours ago" or whatever if you have to. I've never understood takin…

I agree. GitHub does this too on commits. "foo.cpp modified last year." It makes no sense, at least without the ability to view additional datetime information.

Particularly when many systems I've seen group the past three years into last year.

It feels like the categories are:

"Today, Yesterday, This Week, This Month, Last Year, Big Bang"

Post reply on HN