u/AlchemonDev

▲ 18 r/bash

local -n can modify variables from other functions

In Bash, normal local variables are usually fine.
But with local -n (namerefs) I noticed they can sometimes change variables from outer/previous functions because of how scoping works.

To avoid problems I started giving local variables unique names (with prefixes) instead of short ones.

Anyone else ran into this with namerefs?

reddit.com
u/AlchemonDev — 9 days ago
▲ 10 r/bash

I built a visual game entirely in pure Bash — here is the demo and full source code!

Hey everyone,

I wanted to show what's actually possible using just pure Bash—from custom terminal graphics and animations to game logic.

I've been working on a project called Alchemon, a game written completely in Shell script that pushes terminal visual output to its limits. No external heavy frameworks, just raw CLI magic!

📹 Watch the gameplay demo on YouTube: > https://www.youtube.com/watch?v=yFOpOPtk-Sc

💻 Check out the source code on GitHub: > https://github.com/mrugaladamian/alchemon

Feel free to clone it, test it out, or drop any feedback/ideas. Hope you enjoy it!

u/AlchemonDev — 15 days ago