Overcoming the limitations of the POSIX shell command language
summary
Implements function scope via stacked variable prefixes by saving/restoring variables with a depth counter and eval, fixes the install_many bug in the demo, and provides a module system with var/const/fn/module/use and generated aliases so functions see their module state. Import can load modules from local or GitHub by fetching and initialising scripts, but it only works reliably under strict POSIX shells (dash), is noticeably slow and unsigned, so it proves feasibility but trades performance and safety.
AI-written summary · about
chapters (19)
- 0:00Start
- 0:26Overcoming the Limitations of Posex Shell Command Language
- 0:55Overcoming the Limitations of the Posix Command Shell
- 1:50The Posix Command Shell
- 2:40The Posix Command Shell Language
- 4:22Features
- 5:31Co-Distribution
- 6:28Global Variable Scope
- 7:38Install this Install File Function
- 8:02Install Menu Function
- 13:57Function Scope
- 17:46Modules
- 18:07What Is a Module
- 20:35Defining Variables and Constants in the Scope
- 21:12Posix Shell with Aliases
- 23:24Use Command
- 32:57Why Not Use Subshells Instead of Manually Creating a Scope Command
- 34:49Is the Scope Stack Always Safe in Case the Variables Contain Special Characters
- 36:13Recommend any Shell Check Utilities
related talks
29mTake Back Your Bash by Becoming a CLI Ninja!
32mUsage and implementation of Reish which is an Unix shell for Rubyist
01h 39mDr. Strangepipes Or: How I Learned To Stop Worrying && Function In Shell
56mDevOps: How to train your Bash
47mA Guide to the Shell Galaxy
16mhS: Speculative Script Reordering at Subprocess Granularity
30mBash, the Developer's Swiss Army Knife
28mPowerShell Core 101
