Better HN
topnewbestaskshowjobs
Log inSign up

mathfailure

308 karma · joined Apr 27, 2019 (7y ago) · 312 submissions

Submissions

comment 9mo ago · link · parent

That's not a dichotomy.

comment 9mo ago · link · parent

That's probably a security feature.

comment 9mo ago · link · parent

tl;dw

comment 9mo ago · link · parent

No, there are no such news yet, only hearsay.

comment 9mo ago · link · parent

What stops them from selling it to an affiliated entity for 1 eurocent and thus evade the ban?

comment 9mo ago · link · parent

Looks believable that they are indeed the devs behind the project, but it's weird to post stuff like that to... reddit? They have a site for the project, why not post there?

comment 9mo ago · link · parent

One can start working on creation of a teleportation device. Doesn't mean we have it.

https://asahilinux.org/docs/platform/feature-support/m3/

What do you see as progress here? Nothing is supported, everything is "to be announced" (i.e. unsupported).

comment 9mo ago · link · parent

They did. Just not explicitly.

comment 9mo ago · link · parent

Not if if you APPEND the dot path to the PATH env: the system traverses the dirs specified in the PATH env from left to right and stops at first match. Your system's sed binary is in the dir that's to the left of your '.' dir.

comment 9mo ago · link · parent

> if you end up in a directory that's not under your control, and you do a "ls", it might execute "./ls" instead of /usr/bin/ls,

Not if if you APPEND the dot path to the PATH env: the system traverses the dirs specified in the PATH env from left to right and stops at first match. Your system's ls binary is in the dir that's to the left of your '.' dir.

comment 9mo ago · link · parent

No, in fact he is correct: system scripts won't pick up your overrides configured via your shell's rc scripts.

comment 9mo ago · link · parent

Because it's useless extra typing. People try to narrow commands down to two fucking chars and you suggest to type the whole goddamn path!

comment 9mo ago · link · parent

Kinda makes no sense to me: so you don't use '--' as a prefix, you use it in the middle of an alias, so you first have to autocomplete, say, 'gi' not to 'git' but to 'git--progress'. What does that alias do? Doesn't it call git with some args? If so - why not just alias it to git?

comment 9mo ago · link · parent

> I prefer giving scripts numbers instead of names

> Something like "[number"

> It contains 100s of short scripts

So you call scripts like [1 [2 [3 [4 ... and remember what each one of them does? If yes - that's nuts, I'd visit a doctor.

comment 9mo ago · link · parent

People tend to want some separation between what's theirs and what's others. Other programs/scripts quite often put something into ~/.local/bin, so it's not yours actually, it's theirs.

comment 9mo ago · link · parent

Ah, I see you're a man of culture as well!

comment 9mo ago · link · parent

I like to follow my own convention where I name files with shell scripts with an extension: .sh for POSIX-compatible scripts, .bash for scripts with bashisms or .zsh for scripts with zshisms.

If I ever wanted to achieve what you initially wanted to achieve - I could use something like

alias -s sh=sh

alias -s bash=bash

alias -s zsh=zsh

Just like I do bind .txt and .conf to 'less', .pdf to 'qpdf', .json to 'ijq', video formats to 'mpv' and so on.

comment 9mo ago · link · parent

One rarely actually needs to shadow binaries. Some cases could indeed be covered by introducing an alias that binds the binary's name to call a different copy of that binary.

You use shadowing to fix issues where you install some software that expects you to have a sane and ~recent version of some tool like git, but you don't as your system provides that binary and unfortunately it is either not sane (not GENERALLY sane [while it could be sane for system scripts]) or not recent enough. In that case the program's function would simply fail if it would call the system's binary and you shadow the binary with your version to fix that.

> adding your script directory in front of the PATH

That's a poor advice for the scripts you call relatively frequently. Instead, (as a general approach, we aren't discussing some particular script) don't use shadowing for scripts: just pick a non-conflicting script name and append the script's dir to $PATH.

comment 9mo ago · link · parent

No, don't do that as a precaution. As others have already answered correctly - it's too late to worry about such things if a malicious agent has write access to your ${HOME} dir.

comment 9mo ago · link · parent

Not really, since if one usually does that - they probably understand the possible consequences and don't shadow whatever they like, but do it carefully.

On MacOS I shadow that way just curl and git binaries to the versions installed from homebrew and nothing has broken (yet). I know that tar on MacOS is also a weirdo that I'd rather shadow with the homebrew's gtar, but their args are different and I of course understand that there's a high probability of something in system to be bound to mac's version of tar, so here I better remember to use 'sane' tar as gtar or use an alias (instead of shadowing the binary) for tar to use gtar (because aliases are for users, not for system scripts/processes).

And on my home desktop's Debian - I don't even use shadowing of binaries at all (never needed it).

Also, I just realized: I change PATH env via my shell's rc script (~/.zshrc), so I probably could worry even less about shadowing system binaries (like tar on MacOS) possibly breaking things.

comment 9mo ago · link · parent

I never knew that what I've known as 'hotstrings' (since the AutoHotKey days) other sometimes also call 'text expanders'.

comment 9mo ago · link · parent

Others have already given valid answers: grep is not ripgrep [their params don't match], so it's a bad idea to alias 'grep' to use ripgrep. But it's okay to alias 'ripgrep' (or 'rg' or whatever) to use ripgrep with some args.

comment 9mo ago · link · parent

I didn't like the idea. I prefer the alternative approach: _I_ decide the order of dirs in the PATH env. If I introduce an executable with a name, that overrides a system one - I probably do that intentionally.

If I introduce an alias (like `grep='grep --binary-files=without-match --ignore-case --color=auto`) that matches the name of a system binary - I probably do that intentionally.

And if I EVER need to call grep without my alias - I just prefix it with a backslash: \grep will search with case sensitivity and no color and will scan binaries.

comment 10mo ago · link · parent

Surely they do! The data is in the public internets, aren't they?

comment 10mo ago · link · parent

The 2. Thank you.

comment 10mo ago · link · parent

This source is shit: it doesn't grant open access.
12345
11