The ubiquitousness of bash is among the few reasons why it continues to endure. It will be eternal if nobody tries to replace it.
The ubiquitousness of bash is among the few reasons why it continues to endure. It will be eternal if nobody tries to replace it.
Bash maintainer actually implemented the library feature I suggested and it's already dramatically cut down the amount of unsightly bash code I need to keep around and maintain.
I'm getting pretty tired of coping with old stuff just because it's there though. Went through this phase with GNU make too.
Doubt. I'm up to my neck in bashisms, and I require the very latest bash on top of that.
import() {
local f
for f in "$@"; do
[[ -v loaded[$f] ]] && continue
loaded[$f]=1
source -p "${HOME}/.local/lib/bash" "${f}"
done
}
import arguments terminal
The -p flag for source landed in bash 5.3.Nevertheless, a version of the feature landed in bash 5.3.
source -p "${HOME}/.local/lib/bash" file
You can use that to implement the library import function yourself. import() {
local f
for f in "$@"; do
[[ -v loaded[$f] ]] && continue
loaded[$f]=1
source -p "${HOME}/.local/lib/bash" "${f}"
done
}
import arguments terminalmixing shells is not as hard as some people claim. it's like switching programming languages. i do that all the time. but then, i avoid bash scripting as much as i can (or shell scripting in general). if you actually enjoy bash scripting then switching may be harder.
Fish scripting is limited to functions/aliases and this works out well since they're easy to read and tweak over time.
before fish basically noone dared to break bash compatibility. zsh is bash on steroids and other incompatible shells like csh, tcsh, ksh, etc were dead ends in that they kept a niche status.
fish was the first shell to break out of that and actually get noticed and gain a following. i believe that all other alternative shells after fish were encouraged only because of fish's popularity.
and here I was thinking ubiquity was ubiquitous for this concept
>ubiquity of bash is among the few reasons...
I guess I'm getting older than I thought, I feel uneasy pangs every time I use a bashism because /bin/sh is the ubiquitous one.