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.
319 karma · joined April 27, 2019
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.
> 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.
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.
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.
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.
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.
Also, did the country truly survive just fine without it before that? Are you familiar with crime stats? Could you share the data on levels of crime carried by illegal immigrants over the years?
podman run mcr.microsoft.com/windows:ltsc2019
Trying to pull mcr.microsoft.com/windows:ltsc2019...
Error: choosing an image from manifest list docker://mcr.microsoft.com/windows:ltsc2019: no image found in manifest list for architecture amd64, variant "", OS linux
And what is democratic about the fact that majority of people votes for candidate A, yet candidate B becomes the president because... because it's people don't actually vote for president, they vote for someone who counts pro-some party and it's THEY who vote for president in the end. What's democratic about corruption being completely legal (lobbying)? Do you know a single post-USSR country where lobbying is legal? (Hell, how can it be legal at all? there's no distinction between lobbying and corruption, that's the same thing!)
Doesn't work for me (Sequoia 15.4)
If you are happy to share the code - I think quite some people would be happy. The openness doesn't guarantee, but usually leads to better security, performance, etc.
It is very nice of you to provide such a service (and for free, as I see), but your docs says we, users, better not update stuff faster than once per second and that's quite a big limitation for some big companies with lots of processes to track (which probably can't be grouped together into a single batch update as your docs suggest to do).