livellosegreto.it is one of the many independent Mastodon servers you can use to participate in the fediverse.
Livello Segreto è il social etico che ha rispetto di te e del tuo tempo.

Administered by:

Server stats:

1.3K
active users

#bash

25 posts22 participants1 post today

I have a #Bash alias (actually a function) for `git clone` that sets my #git config username and email address based on a prompt (I can select between various accounts/SSH keys I have).

I now want to do a similar thing for `git init`. Is there an easy way to call the same bash code for the prompt and setting git config values without duplicating it all between my two functions?

AFAIK bash functions cannot return values (e.g. my chosen username/email)...

I'm happy to announce #notesbash v1.1.0 📑! New features include:
- A customizable export system to export your #markdown #notes using e.g. #pandoc
- a preview feature using the new term-open script, a #xdg-open like utility, but for the terminal
- a `.desktop` file for your favorite app-launcher
- completion scripts for #bash and #zsh
- the default extension set in the config is now used for all notes
codeberg.org/carmatani/notesba
#opensource #tui #terminal #foss

Summary card of an release titled "v1.1.0" in repository carmatani/notesbash
Codeberg.orgv1.1.0 - carmatani/notesbash## Changelog [notesbash v1.1.0](https://codeberg.org/carmatani/notesbash) ### New features - There is now a customizable export system to export your notes using e.g. pandoc, but you can write your own exporter if you like ([demo](https://codeberg.org/carmatani/notesbash#export-your-notes)...

This is weird but alt + backspace no longer works on #Alacritty if you're using a #Fish shell, it does work on #Bash. I don't think this is a Fish "issue" either, since that keybind still works as expected, with Fish, on #Konsole. Anyone knows how to fix this?

---

edit:

I just realised that this is prolly not an issue with Alacritty + Fish on a "vanilla" setup - this only occurs when using
#Toshy, a neat utility I've been using for a (long) while now that configures and mimics a #macOS like keybinds on a #Linux system through a service (that can easily be stopped/started, etc.).

I've reported this
issue on their repo to see if they're able to figure this out. It most likely has something to do with the new Fish 4.0.0 release, since I'm still using the same Alacritty (and Toshy) version since this issue started.

🔗 https://github.com/RedBearAK/toshy/issues/573

Linux distro name: EndeavourOS Distro variant: Arch Linux Distro version: 6.12.18-1-lts (64-bit) X11/Xorg or Wayland: Wayland Desktop environment: KDE Plasma DE major version: 6.3.2 Window manager:...
GitHub[BUG] "Alt"+Backspace stopped working in Alacritty + Fish 4.0 · Issue #573 · RedBearAK/toshyBy irfanhakim-as
Continued thread

A fabulous amount of source notes pop up

{quote

scsi_all.h started out life as a work by Julian Elischer to add SCSI
support to CMU Mach 2.5. It was 373 lines. Julian ported this to 386BSD,
included in the 386BSD patch kit and incorported into FreeBSD at its
creation. Justin used this file when writing CAM, and imported it with
the initial CAM import, but only 30% (100 lines) of the original
remained. Justin moved from bitfields to bytes in structures, dropped
the complex unions, and renamed many structures to have their length
appended. Only about 30 structure names and about 40 #defines remained
from the original. The define names were taken directly from the SCSI
standard with spaces replaced by '_', so had no creativity. Apart from
the license comment, there were no comments retained (all the comments
in the CAM import were written by Justin and Ken). Even at that time,
Justin and Ken could have put their copyrights and names and moved to an
acknowledgement of Julian.

In the almost 30 years since that original import, this file has grown
to 4500 lines. Kenneth Merry, Alexander Motin and Justin Gibbs write
85% of the file's lines, if mechanical commits are omitted. Other
contributors contributed less than %5 each of the file.

Replace the original license (which lacked a copyright even and has been
criticized as ambiguous) with FreeBSD's standard 2-clause license. Add
copyrights for Justin, Ken and Alexander, with the date ranges they
contributed to the file. Add a note about the origin of the file to
acknowledge Julian's original work upon which all this was built, though
it's become a ship of Theseus in the mean time, built and rebuild many
times.

On an absolute scale, there's less than 1% of the current file with
lines from the original, and those are named after the names in the SCSI
standards and likely wouldn't qualify for copyright protection.

Sponsored by: Netflix
Reviewed by: mav, ken
Differential Revision: reviews.freebsd.org/D49016

End Quote}
^Z

How wonderful to have learned this now

#bash #csh #ksh #sh #freeBSD #SCSI #bhyve #jails #ZFS #programming #POSIX

codeberg.org/FreeBSD/freebsd-s

Summary card of repository FreeBSD/freebsd-src
Codeberg.orgcam: Update scsi_all.h to reflect 30 years of evolution · 1016b3c344 scsi_all.h started out life as a work by Julian Elischer to add SCSI support to CMU Mach 2.5. It was 373 lines. Julian ported this to 386BSD, included in the 386BSD patch kit and incorported into FreeBSD at its creation. Justin used this file when writing CAM, and imported it with the initial CA...