Apps do bash
I know the name may seem strange but the question is
Where can I learn more about the bash structure
(In this case, the apps that are native to it)
I'm asking this question because from the answers I received in the post I made in this Sub, bash is
* A programming language (although it's not as complete as others because it doesn't deal well with arrays (if I'm not mistaken it was something like that) and other things I still need to know)
*An interpreted language (converts lines one by one, which can be a bit slow)
*TMB is a noscripting language, which can execute system-related commands
It's a prompt (or shell, maybe Shell and prompt are the same thing. By the time I finish this post I will have researched and discovered the answer.
But to summarize the question, I would like to know if commands like ls, cd, cat etc. are native to bash or the system and if they are native to the system, if there are apps native to bash and where can I find out more about them.
https://redd.it/1o9ww14
@r_bash
I know the name may seem strange but the question is
Where can I learn more about the bash structure
(In this case, the apps that are native to it)
I'm asking this question because from the answers I received in the post I made in this Sub, bash is
* A programming language (although it's not as complete as others because it doesn't deal well with arrays (if I'm not mistaken it was something like that) and other things I still need to know)
*An interpreted language (converts lines one by one, which can be a bit slow)
*TMB is a noscripting language, which can execute system-related commands
It's a prompt (or shell, maybe Shell and prompt are the same thing. By the time I finish this post I will have researched and discovered the answer.
But to summarize the question, I would like to know if commands like ls, cd, cat etc. are native to bash or the system and if they are native to the system, if there are apps native to bash and where can I find out more about them.
https://redd.it/1o9ww14
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
is there any way to make bash to work like zsh more
- first of all, can i make bash to constantly write and read command history like ZSH(real-time) ❓
i don't wanna switch only for this one reason. so if there is a way then it'll be better for me. I'll stick to bash anyways.
- second question : can i run bash noscript normally if my terminal emulator is using zsh❓ like inwindows we can run .bat (batch noscript) from powershell. powershell is nice and it lets me run batch noscript like it would run in command prompt by invoking cmd.exe
https://redd.it/1oaayn2
@r_bash
- first of all, can i make bash to constantly write and read command history like ZSH(real-time) ❓
i don't wanna switch only for this one reason. so if there is a way then it'll be better for me. I'll stick to bash anyways.
- second question : can i run bash noscript normally if my terminal emulator is using zsh❓ like inwindows we can run .bat (batch noscript) from powershell. powershell is nice and it lets me run batch noscript like it would run in command prompt by invoking cmd.exe
https://redd.it/1oaayn2
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Trying To Figure Out TMUX
So I have been trying to learn and use TMUX for a simple SMS PDU creator. But I am severely struggling with the finer aspects of TMUX. My main problem really starts at the second to last line. -->
tmux attach-session -t SMDS
Originally I wanted to create the entire TMUX layout in the 'initialization' part of my noscript and the use the 'main' part for the actual functionality. I quickly became frustrated when anything passed the attach-session command would not execute until I executed
tmux kill-server
Then anything passed that line would execute and throw errors because, well, there was no longer a TMUX server running, let alone the modifications to the panes I was trying to accomplish. So to where I am now. I decided I guess I will just put the functionality inside with all the layout code. I don't like it. It's not clean, mixes together two chunks of code that, atleast in my mind, should be separated. But worse above all? It doesn't even work either.
Now when I joined this sub to ask for some help the first thing I saw was a post about set -x. So I added it quick. I learned that even though I am sending keys, to run a blocking command(read -p), for whatever reason it does not work the way I thought it would. It continues right passed the read command. Though SMDS:0.0 is waiting for my input, the main part of the code continues to execute. So before I get a chance to even type a single input character set -x showed that it continues right on passed the read and right on passed the case statement.
So I guess ultimately, could someone point me in the direction of a good place to start understanding TMUX. I did all this reading online trying to solve my first issue(not executing passed the attach-session command), and yet not one tutorial, 101, or even reading codes and codes, hinted that attach-session was a blocking command. I just kinda had to experimentally figure that one out. So a point in the right direction, or a hint at something that I am missing or overlooking, or hell at this point, a piece of blocking code that works inside of a TMUX session, would be most welcome. I just started trying to learn TMUX yesterday so I definitely lack in knowledge, but I did stay up till 6am this morning trying to figure out these seemingly super simple issues. What am I missing?
Thank you in advance!
#!/data/data/com.termux/files/usr/bin/bash
#:INTRO{{{
##
# Droid Rage #
# PDUMaker.sh #
# ~~7.3.3.~~ #
# 10/07/25 #
##
#Definitely gonna butcher this...
#:INTRO}}}
#:PRE-INIT{{{
set -x
#:PRE-INIT}}}
#:VARIABLES{{{
read -r RWS CLMS <<< "$(stty size)"
#:VARIABLES}}}
#:FUNCTIONS{{{
EndPrgm(){
read -p "ENTER To Exit"
exit 0
}
#:FUNCTIONS}}}
#:INITIALIZE{{{
#Kill Previous/Start Anew
tmux kill-server
tmux new-session -d -s SMDS -x- -y-
#Pane Creation
tmux split-window -v
tmux resize-pane -t SMDS:0.0 -y 1
tmux split-window -h -t SMDS:0.1
tmux split-window -v -t SMDS:0.1
tmux resize-pane -t SMDS:0.3 -x $(($CLMS/3))
#Pane Titles
tmux select-pane -t SMDS:0.0 -T 'Input Prompt'
tmux select-pane -t SMDS:0.1 -T 'PDU Information'
tmux select-pane -t SMDS:0.2 -T 'Command Outputs'
tmux select-pane -t SMDS:0.3 -T 'Imports'
#Prep Pane
[ -f redirect ] && rm redirect
touch redirect
#Pane Commands
tmux send-keys -t SMDS:0.0 'exec > redirect; clear' ENTER
tmux send-keys -t SMDS:0.0 C-l ENTER
tmux send-keys -t SMDS:0.1 'PS1=""' ENTER
tmux send-keys -t SMDS:0.1 'clear' ENTER
tmux send-keys -t SMDS:0.2 'PS1=""' ENTER
tmux send-keys -t SMDS:0.2 'tail -f redirect' ENTER
tmux send-keys -t SMDS:0.3 'PS1=""' ENTER
tmux send-keys -t SMDS:0.3 'clear' ENTER
tmux run-shell -t SMDS:0.3 'ls -X Imports' ENTER
#Pane Disabling
tmux select-pane -d -t
So I have been trying to learn and use TMUX for a simple SMS PDU creator. But I am severely struggling with the finer aspects of TMUX. My main problem really starts at the second to last line. -->
tmux attach-session -t SMDS
Originally I wanted to create the entire TMUX layout in the 'initialization' part of my noscript and the use the 'main' part for the actual functionality. I quickly became frustrated when anything passed the attach-session command would not execute until I executed
tmux kill-server
Then anything passed that line would execute and throw errors because, well, there was no longer a TMUX server running, let alone the modifications to the panes I was trying to accomplish. So to where I am now. I decided I guess I will just put the functionality inside with all the layout code. I don't like it. It's not clean, mixes together two chunks of code that, atleast in my mind, should be separated. But worse above all? It doesn't even work either.
Now when I joined this sub to ask for some help the first thing I saw was a post about set -x. So I added it quick. I learned that even though I am sending keys, to run a blocking command(read -p), for whatever reason it does not work the way I thought it would. It continues right passed the read command. Though SMDS:0.0 is waiting for my input, the main part of the code continues to execute. So before I get a chance to even type a single input character set -x showed that it continues right on passed the read and right on passed the case statement.
So I guess ultimately, could someone point me in the direction of a good place to start understanding TMUX. I did all this reading online trying to solve my first issue(not executing passed the attach-session command), and yet not one tutorial, 101, or even reading codes and codes, hinted that attach-session was a blocking command. I just kinda had to experimentally figure that one out. So a point in the right direction, or a hint at something that I am missing or overlooking, or hell at this point, a piece of blocking code that works inside of a TMUX session, would be most welcome. I just started trying to learn TMUX yesterday so I definitely lack in knowledge, but I did stay up till 6am this morning trying to figure out these seemingly super simple issues. What am I missing?
Thank you in advance!
#!/data/data/com.termux/files/usr/bin/bash
#:INTRO{{{
##
# Droid Rage #
# PDUMaker.sh #
# ~~7.3.3.~~ #
# 10/07/25 #
##
#Definitely gonna butcher this...
#:INTRO}}}
#:PRE-INIT{{{
set -x
#:PRE-INIT}}}
#:VARIABLES{{{
read -r RWS CLMS <<< "$(stty size)"
#:VARIABLES}}}
#:FUNCTIONS{{{
EndPrgm(){
read -p "ENTER To Exit"
exit 0
}
#:FUNCTIONS}}}
#:INITIALIZE{{{
#Kill Previous/Start Anew
tmux kill-server
tmux new-session -d -s SMDS -x- -y-
#Pane Creation
tmux split-window -v
tmux resize-pane -t SMDS:0.0 -y 1
tmux split-window -h -t SMDS:0.1
tmux split-window -v -t SMDS:0.1
tmux resize-pane -t SMDS:0.3 -x $(($CLMS/3))
#Pane Titles
tmux select-pane -t SMDS:0.0 -T 'Input Prompt'
tmux select-pane -t SMDS:0.1 -T 'PDU Information'
tmux select-pane -t SMDS:0.2 -T 'Command Outputs'
tmux select-pane -t SMDS:0.3 -T 'Imports'
#Prep Pane
[ -f redirect ] && rm redirect
touch redirect
#Pane Commands
tmux send-keys -t SMDS:0.0 'exec > redirect; clear' ENTER
tmux send-keys -t SMDS:0.0 C-l ENTER
tmux send-keys -t SMDS:0.1 'PS1=""' ENTER
tmux send-keys -t SMDS:0.1 'clear' ENTER
tmux send-keys -t SMDS:0.2 'PS1=""' ENTER
tmux send-keys -t SMDS:0.2 'tail -f redirect' ENTER
tmux send-keys -t SMDS:0.3 'PS1=""' ENTER
tmux send-keys -t SMDS:0.3 'clear' ENTER
tmux run-shell -t SMDS:0.3 'ls -X Imports' ENTER
#Pane Disabling
tmux select-pane -d -t
Trying To Figure Out TMUX
So I have been trying to learn and use TMUX for a simple SMS PDU creator. But I am severely struggling with the finer aspects of TMUX. My main problem really starts at the second to last line. -->
tmux attach-session -t SMDS
Originally I wanted to create the entire TMUX layout in the 'initialization' part of my noscript and the use the 'main' part for the actual functionality. I quickly became frustrated when anything passed the attach-session command would not execute until I executed
tmux kill-server
Then anything passed that line would execute and throw errors because, well, there was no longer a TMUX server running, let alone the modifications to the panes I was trying to accomplish. So to where I am now. I decided I guess I will just put the functionality inside with all the layout code. I don't like it. It's not clean, mixes together two chunks of code that, atleast in my mind, should be separated. But worse above all? It doesn't even work either.
Now when I joined this sub to ask for some help the first thing I saw was a post about set -x. So I added it quick. I learned that even though I am sending keys, to run a blocking command(read -p), for whatever reason it does not work the way I thought it would. It continues right passed the read command. Though SMDS:0.0 is waiting for my input, the main part of the code continues to execute. So before I get a chance to even type a single input character set -x showed that it continues right on passed the read and right on passed the case statement.
So I guess ultimately, could someone point me in the direction of a good place to start understanding TMUX. I did all this reading online trying to solve my first issue(not executing passed the attach-session command), and yet not one tutorial, 101, or even reading codes and codes, hinted that attach-session was a blocking command. I just kinda had to experimentally figure that one out. So a point in the right direction, or a hint at something that I am missing or overlooking, or hell at this point, a piece of blocking code that works inside of a TMUX session, would be most welcome. I just started trying to learn TMUX yesterday so I definitely lack in knowledge, but I did stay up till 6am this morning trying to figure out these seemingly super simple issues. What am I missing?
Thank you in advance!
#!/data/data/com.termux/files/usr/bin/bash
#:INTRO{{{
#***************#
# Droid Rage #
# PDUMaker.sh #
# ~*~7.3.3.~*~ #
# 10/07/25 #
#***************#
#Definitely gonna butcher this...
#:INTRO}}}
#:PRE-INIT{{{
set -x
#:PRE-INIT}}}
#:VARIABLES{{{
read -r RWS CLMS <<< "$(stty size)"
#:VARIABLES}}}
#:FUNCTIONS{{{
EndPrgm(){
read -p "ENTER To Exit"
exit 0
}
#:FUNCTIONS}}}
#:INITIALIZE{{{
#Kill Previous/Start Anew
tmux kill-server
tmux new-session -d -s SMDS -x- -y-
#Pane Creation
tmux split-window -v
tmux resize-pane -t SMDS:0.0 -y 1
tmux split-window -h -t SMDS:0.1
tmux split-window -v -t SMDS:0.1
tmux resize-pane -t SMDS:0.3 -x $(($CLMS/3))
#Pane Titles
tmux select-pane -t SMDS:0.0 -T 'Input Prompt'
tmux select-pane -t SMDS:0.1 -T 'PDU Information'
tmux select-pane -t SMDS:0.2 -T 'Command Outputs'
tmux select-pane -t SMDS:0.3 -T 'Imports'
#Prep Pane
[[ -f redirect ]] && rm redirect
touch redirect
#Pane Commands
tmux send-keys -t SMDS:0.0 'exec > redirect; clear' ENTER
tmux send-keys -t SMDS:0.0 C-l ENTER
tmux send-keys -t SMDS:0.1 'PS1=""' ENTER
tmux send-keys -t SMDS:0.1 'clear' ENTER
tmux send-keys -t SMDS:0.2 'PS1=""' ENTER
tmux send-keys -t SMDS:0.2 'tail -f redirect' ENTER
tmux send-keys -t SMDS:0.3 'PS1=""' ENTER
tmux send-keys -t SMDS:0.3 'clear' ENTER
tmux run-shell -t SMDS:0.3 'ls -X Imports' ENTER
#Pane Disabling
tmux select-pane -d -t
So I have been trying to learn and use TMUX for a simple SMS PDU creator. But I am severely struggling with the finer aspects of TMUX. My main problem really starts at the second to last line. -->
tmux attach-session -t SMDS
Originally I wanted to create the entire TMUX layout in the 'initialization' part of my noscript and the use the 'main' part for the actual functionality. I quickly became frustrated when anything passed the attach-session command would not execute until I executed
tmux kill-server
Then anything passed that line would execute and throw errors because, well, there was no longer a TMUX server running, let alone the modifications to the panes I was trying to accomplish. So to where I am now. I decided I guess I will just put the functionality inside with all the layout code. I don't like it. It's not clean, mixes together two chunks of code that, atleast in my mind, should be separated. But worse above all? It doesn't even work either.
Now when I joined this sub to ask for some help the first thing I saw was a post about set -x. So I added it quick. I learned that even though I am sending keys, to run a blocking command(read -p), for whatever reason it does not work the way I thought it would. It continues right passed the read command. Though SMDS:0.0 is waiting for my input, the main part of the code continues to execute. So before I get a chance to even type a single input character set -x showed that it continues right on passed the read and right on passed the case statement.
So I guess ultimately, could someone point me in the direction of a good place to start understanding TMUX. I did all this reading online trying to solve my first issue(not executing passed the attach-session command), and yet not one tutorial, 101, or even reading codes and codes, hinted that attach-session was a blocking command. I just kinda had to experimentally figure that one out. So a point in the right direction, or a hint at something that I am missing or overlooking, or hell at this point, a piece of blocking code that works inside of a TMUX session, would be most welcome. I just started trying to learn TMUX yesterday so I definitely lack in knowledge, but I did stay up till 6am this morning trying to figure out these seemingly super simple issues. What am I missing?
Thank you in advance!
#!/data/data/com.termux/files/usr/bin/bash
#:INTRO{{{
#***************#
# Droid Rage #
# PDUMaker.sh #
# ~*~7.3.3.~*~ #
# 10/07/25 #
#***************#
#Definitely gonna butcher this...
#:INTRO}}}
#:PRE-INIT{{{
set -x
#:PRE-INIT}}}
#:VARIABLES{{{
read -r RWS CLMS <<< "$(stty size)"
#:VARIABLES}}}
#:FUNCTIONS{{{
EndPrgm(){
read -p "ENTER To Exit"
exit 0
}
#:FUNCTIONS}}}
#:INITIALIZE{{{
#Kill Previous/Start Anew
tmux kill-server
tmux new-session -d -s SMDS -x- -y-
#Pane Creation
tmux split-window -v
tmux resize-pane -t SMDS:0.0 -y 1
tmux split-window -h -t SMDS:0.1
tmux split-window -v -t SMDS:0.1
tmux resize-pane -t SMDS:0.3 -x $(($CLMS/3))
#Pane Titles
tmux select-pane -t SMDS:0.0 -T 'Input Prompt'
tmux select-pane -t SMDS:0.1 -T 'PDU Information'
tmux select-pane -t SMDS:0.2 -T 'Command Outputs'
tmux select-pane -t SMDS:0.3 -T 'Imports'
#Prep Pane
[[ -f redirect ]] && rm redirect
touch redirect
#Pane Commands
tmux send-keys -t SMDS:0.0 'exec > redirect; clear' ENTER
tmux send-keys -t SMDS:0.0 C-l ENTER
tmux send-keys -t SMDS:0.1 'PS1=""' ENTER
tmux send-keys -t SMDS:0.1 'clear' ENTER
tmux send-keys -t SMDS:0.2 'PS1=""' ENTER
tmux send-keys -t SMDS:0.2 'tail -f redirect' ENTER
tmux send-keys -t SMDS:0.3 'PS1=""' ENTER
tmux send-keys -t SMDS:0.3 'clear' ENTER
tmux run-shell -t SMDS:0.3 'ls -X Imports' ENTER
#Pane Disabling
tmux select-pane -d -t
SMDS:0.1
tmux select-pane -d -t SMDS:0.2
tmux select-pane -d -t SMDS:0.3
#:INITIALIZE}}}
#:MAIN{{{
#Get Commands
tmux select-pane -t SMDS:0.0
#tmux set-buffer "read -p 'Start|-->' Cmd"
#tmux paste-buffer
#tmux send-keys -t SMDS:0.0 C-m
tmux send-keys -t SMDS:0.0 "read -p 'Start|-->' Cmd" ENTER
case "$Cmd" in
"Import")
echo "yea"
;;
"Export")
echo "yeah"
;;
"Custom")
echo "yah"
;;
"Help")
#tmux send-keys -t SMDS:0.1 "cat Imports/PDUGuide.hlp" ENTER
#tmux send-keys -t SMDS:0.3 "cat Imports/QuickGuide.hlp" ENTER
echo "yay"
;;
*)
tmux send-keys -t SMDS:0.2 'No Match' ENTER
;;
esac
#Show/Enter The Mess We Devised
tmux attach-session -t SMDS
#:MAIN}}}
https://redd.it/1oayq30
@r_bash
tmux select-pane -d -t SMDS:0.2
tmux select-pane -d -t SMDS:0.3
#:INITIALIZE}}}
#:MAIN{{{
#Get Commands
tmux select-pane -t SMDS:0.0
#tmux set-buffer "read -p 'Start|-->' Cmd"
#tmux paste-buffer
#tmux send-keys -t SMDS:0.0 C-m
tmux send-keys -t SMDS:0.0 "read -p 'Start|-->' Cmd" ENTER
case "$Cmd" in
"Import")
echo "yea"
;;
"Export")
echo "yeah"
;;
"Custom")
echo "yah"
;;
"Help")
#tmux send-keys -t SMDS:0.1 "cat Imports/PDUGuide.hlp" ENTER
#tmux send-keys -t SMDS:0.3 "cat Imports/QuickGuide.hlp" ENTER
echo "yay"
;;
*)
tmux send-keys -t SMDS:0.2 'No Match' ENTER
;;
esac
#Show/Enter The Mess We Devised
tmux attach-session -t SMDS
#:MAIN}}}
https://redd.it/1oayq30
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
How do you export your full package list?
I am building a short noscript to export all installed packages to reproduce my setup later:
Did I miss anything?
If you do anything like that - how do you do it?
https://redd.it/1oe77jj
@r_bash
I am building a short noscript to export all installed packages to reproduce my setup later:
# System Packages
# apt list --installed > apt.list
# pacman -Qe > pacman.list
rpm -qa > rpm.list
# Special package managers
flatpak list --system --app --columns=application | tail -n+1 | sort -u > flatpak.list
brew list -1 --installed-on-request > brew.list
npm list --global --depth=0 > node.npm.list
pnpm list --global --depth=0 > node.pnpm.list
pip list --not-required > python.pip.list
gem list > ruby.gem.list
pipx list --global --short
# Desktop plugins
gnome-extensions list --user --active > gnome.ext.usr.list
gnome-extensions list --system --active > gnome.ext.sys.list
# Containers
sudo podman images --format {{.Repository}}:{{.Tag}} > podman.img.list
Did I miss anything?
If you do anything like that - how do you do it?
https://redd.it/1oe77jj
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
shpack: bundle folder of noscripts to single executable
shpack is a Go-based build tool that bundles multiple shell noscripts into a single, portable executable.
It lets you organize noscripts hierarchically, distribute them as one binary, and run them anywhere — no dependencies required.
https://github.com/luongnguyen1805/shpack/
https://redd.it/1odvswf
@r_bash
shpack is a Go-based build tool that bundles multiple shell noscripts into a single, portable executable.
It lets you organize noscripts hierarchically, distribute them as one binary, and run them anywhere — no dependencies required.
https://github.com/luongnguyen1805/shpack/
https://redd.it/1odvswf
@r_bash
GitHub
GitHub - luongnguyen1805/shpack: Build and package shell-noscripts to single Executable.
Build and package shell-noscripts to single Executable. - luongnguyen1805/shpack
confused af
https://preview.redd.it/q0left7r0nwf1.png?width=1801&format=png&auto=webp&s=b8d3cd93be4c9eba601365f312e3cd0e2b80649e
I'm trying to make a menu for systemctl but it's not working. I expected it to run until the fzf process taking input exits. currently it runs a couple of loops then exits. tell me what I'm doing wrong?
#!/bin/bash
SOCKID=`head /dev/urandom | tr -dc A-Za-z-1-9 | head -c 16`
FZFPID=""
FLAG=""
while pgrep -f "fzf --listen=/tmp/fzf-$SOCKID.sock" || test -z "$FLAG" ; do
sudo systemctl --no-pager list-units
#echo `pgrep -f "fzf --listen=/tmp/fzf-$SOCKID.sock"
if [ ! -z "$FZFPID" ]; then
FLAG="got pid"
fi
sleep 0.1
curl -s --unix-socket /tmp/fzf-$SOCKID.sock http \
-d "reload(sudo systemctl --no-pager list-units)+change-prompt($(date +%H:%M:%S)> )"
done | fzf --listen=/tmp/fzf-$SOCKID.sock
https://redd.it/1od48ld
@r_bash
https://preview.redd.it/q0left7r0nwf1.png?width=1801&format=png&auto=webp&s=b8d3cd93be4c9eba601365f312e3cd0e2b80649e
I'm trying to make a menu for systemctl but it's not working. I expected it to run until the fzf process taking input exits. currently it runs a couple of loops then exits. tell me what I'm doing wrong?
#!/bin/bash
SOCKID=`head /dev/urandom | tr -dc A-Za-z-1-9 | head -c 16`
FZFPID=""
FLAG=""
while pgrep -f "fzf --listen=/tmp/fzf-$SOCKID.sock" || test -z "$FLAG" ; do
sudo systemctl --no-pager list-units
#echo `pgrep -f "fzf --listen=/tmp/fzf-$SOCKID.sock"
#echo "FZF_PID: $FZF_PID"
#echo "FLAG: $FLAG"
#echo date +%s
FZF_PID=pgrep -f "fzf --listen=/tmp/fzf-$SOCKID.sock"`if [ ! -z "$FZFPID" ]; then
FLAG="got pid"
fi
sleep 0.1
curl -s --unix-socket /tmp/fzf-$SOCKID.sock http \
-d "reload(sudo systemctl --no-pager list-units)+change-prompt($(date +%H:%M:%S)> )"
done | fzf --listen=/tmp/fzf-$SOCKID.sock
https://redd.it/1od48ld
@r_bash
Introducing Caddie.sh - a modular shell framework + DSL for managing everything from the terminal
Hey everyone 👋
After years of hacking together noscripts and aliases to manage things, I built something I wish existed earlier — [**caddie.sh**](https://github.com/parnotfar/caddie.sh).
It’s a **modular shell framework and extensible DSL** that standardizes your development environment on macOS (possibly Linux later). Think of it as a personal “caddie” for your terminal always ready with the right tools, configs, and shortcuts in an easy to use language. No more looking for noscripts or forgetting aliases, get tab completion, discoverable help, and sophisticated prompts for everything you do.
# 🧩 Highlights
* **One-command setup:** `make install` — bootstraps your dev environment in minutes
* **Modular architecture:** Python, Rust, Ruby, JS, iOS, and more as plug-and-play modules
* **REPL prompt:** Navigate modules interactively (`caddie> rust build`, `caddie> git status`)
* **Cross-tool integration:** Manages brew, nvm, rvm, cargo, xcode, and git consistently
* **Extensible DSL:** Add your own modules and commands without touching core code
* **Beautiful prompts + 50+ productivity aliases**
# 🏗️ Why I built it
I was tired of inconsistent dev setups across teams and machines. I wanted something simple, repeatable, and actually pleasant to use — without reinventing the entire shell.
# 🔗 Links
* GitHub: [parnotfar/caddie.sh](https://github.com/parnotfar/caddie.sh)
* Docs: [Installation guide](https://github.com/parnotfar/caddie.sh/blob/main/docs/installation.md)
* Example modules: [Core, Rust, Python, Git, CLI](https://github.com/parnotfar/caddie.sh/tree/main/docs/modules)
Would love feedback from anyone who lives in the terminal — and ideas for new modules (thinking Go, AWS, Docker next).
🏌️♂️ “Because every developer deserves a good caddie.”
https://redd.it/1odhg8b
@r_bash
Hey everyone 👋
After years of hacking together noscripts and aliases to manage things, I built something I wish existed earlier — [**caddie.sh**](https://github.com/parnotfar/caddie.sh).
It’s a **modular shell framework and extensible DSL** that standardizes your development environment on macOS (possibly Linux later). Think of it as a personal “caddie” for your terminal always ready with the right tools, configs, and shortcuts in an easy to use language. No more looking for noscripts or forgetting aliases, get tab completion, discoverable help, and sophisticated prompts for everything you do.
# 🧩 Highlights
* **One-command setup:** `make install` — bootstraps your dev environment in minutes
* **Modular architecture:** Python, Rust, Ruby, JS, iOS, and more as plug-and-play modules
* **REPL prompt:** Navigate modules interactively (`caddie> rust build`, `caddie> git status`)
* **Cross-tool integration:** Manages brew, nvm, rvm, cargo, xcode, and git consistently
* **Extensible DSL:** Add your own modules and commands without touching core code
* **Beautiful prompts + 50+ productivity aliases**
# 🏗️ Why I built it
I was tired of inconsistent dev setups across teams and machines. I wanted something simple, repeatable, and actually pleasant to use — without reinventing the entire shell.
# 🔗 Links
* GitHub: [parnotfar/caddie.sh](https://github.com/parnotfar/caddie.sh)
* Docs: [Installation guide](https://github.com/parnotfar/caddie.sh/blob/main/docs/installation.md)
* Example modules: [Core, Rust, Python, Git, CLI](https://github.com/parnotfar/caddie.sh/tree/main/docs/modules)
Would love feedback from anyone who lives in the terminal — and ideas for new modules (thinking Go, AWS, Docker next).
🏌️♂️ “Because every developer deserves a good caddie.”
https://redd.it/1odhg8b
@r_bash
GitHub
GitHub - parnotfar/caddie.sh: caddie.sh is a modular shell framework and extensible DSL for the terminal. Built for clarity and…
caddie.sh is a modular shell framework and extensible DSL for the terminal. Built for clarity and consistency, it provides one-command environment setup, automatic module discovery, and a shared la...
is using which in a noscript really necessary ?
In my company, I often see the "which" command used in noscripts, like this :
$(which sudo) $(which find) $backupFolder -maxdepth 1 -type f -name \"backup_${bddToBackup}_*.gz\" -mtime +$backupRotate -exec rm -f {} \;
I guess it's "to be sure" to find the sudo and find command where ever they are
Is it really useful to use which in this case ? From what I understand, which use the path so to me that would be the exact same as just writing "sudo find [...]"
https://redd.it/1oc6ncc
@r_bash
In my company, I often see the "which" command used in noscripts, like this :
$(which sudo) $(which find) $backupFolder -maxdepth 1 -type f -name \"backup_${bddToBackup}_*.gz\" -mtime +$backupRotate -exec rm -f {} \;
I guess it's "to be sure" to find the sudo and find command where ever they are
Is it really useful to use which in this case ? From what I understand, which use the path so to me that would be the exact same as just writing "sudo find [...]"
https://redd.it/1oc6ncc
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
vdl4k - YouTube downloader with 4K support and XDG compliance
Well met r/bash,
I've been working on a bash noscript called **vdl4k** (Video Downloader 4K) that's designed for personal video archiving from YouTube and other platforms. It's lightweight, self-contained, and focuses on high-quality downloads with smart features like resolution upgrades and batch processing.
# Key Features
* **4K Video Support**: Automatically downloads the best available quality up to 4K, with fallbacks for lower resolutions.
* **Resolution Comparison**: If you re-download a video, it compares resolutions and keeps the higher-quality version.
* **Archive Tracking**: Maintains a download history to avoid duplicates (optional).
* **Batch Processing**: Handles playlists or multiple URLs.
* **Comprehensive Logging**: Detailed summaries and logs for every download.
* **Clipboard Integration**: Automatically detects URLs from your clipboard for quick downloads.
* **Configurable**: Easy customization via config files (e.g., change download directory, formats).
* **No Web UI**: Pure command-line for simplicity and privacy.
It's perfect for archiving videos for offline viewing, learning, or personal collections without relying on cloud services.
# Installation
Prerequisites:
* yt-dlp (pip install yt-dlp)
* ffmpeg (sudo apt install ffmpeg on Ubuntu/Debian)
* xsel (optional, for clipboard support)
Download the noscript from [GitHub](https://github.com/yourusername/vdl4k), make it executable:
chmod +x vdl4k
./vdl4k --help
For global access: sudo mv vdl4k /usr/local/bin/
# Usage Examples
# Download a single video
./vdl4k https://youtu.be/VIDEO_ID
# Download a playlist
./vdl4k -p https://youtube.com/playlist?list=PLAYLIST_ID
# Force re-download
./vdl4k -f https://youtu.be/VIDEO_ID
# Verbose mode
./vdl4k -v https://youtu.be/VIDEO_ID
# Why I Built This
I wanted something simple for archiving videos without bloat. It's inspired by yt-dlp but adds personal touches like resolution upgrades and detailed summaries. Great for educational content, tutorials, or music videos.
#
https://redd.it/1oenjfx
@r_bash
Well met r/bash,
I've been working on a bash noscript called **vdl4k** (Video Downloader 4K) that's designed for personal video archiving from YouTube and other platforms. It's lightweight, self-contained, and focuses on high-quality downloads with smart features like resolution upgrades and batch processing.
# Key Features
* **4K Video Support**: Automatically downloads the best available quality up to 4K, with fallbacks for lower resolutions.
* **Resolution Comparison**: If you re-download a video, it compares resolutions and keeps the higher-quality version.
* **Archive Tracking**: Maintains a download history to avoid duplicates (optional).
* **Batch Processing**: Handles playlists or multiple URLs.
* **Comprehensive Logging**: Detailed summaries and logs for every download.
* **Clipboard Integration**: Automatically detects URLs from your clipboard for quick downloads.
* **Configurable**: Easy customization via config files (e.g., change download directory, formats).
* **No Web UI**: Pure command-line for simplicity and privacy.
It's perfect for archiving videos for offline viewing, learning, or personal collections without relying on cloud services.
# Installation
Prerequisites:
* yt-dlp (pip install yt-dlp)
* ffmpeg (sudo apt install ffmpeg on Ubuntu/Debian)
* xsel (optional, for clipboard support)
Download the noscript from [GitHub](https://github.com/yourusername/vdl4k), make it executable:
chmod +x vdl4k
./vdl4k --help
For global access: sudo mv vdl4k /usr/local/bin/
# Usage Examples
# Download a single video
./vdl4k https://youtu.be/VIDEO_ID
# Download a playlist
./vdl4k -p https://youtube.com/playlist?list=PLAYLIST_ID
# Force re-download
./vdl4k -f https://youtu.be/VIDEO_ID
# Verbose mode
./vdl4k -v https://youtu.be/VIDEO_ID
# Why I Built This
I wanted something simple for archiving videos without bloat. It's inspired by yt-dlp but adds personal touches like resolution upgrades and detailed summaries. Great for educational content, tutorials, or music videos.
#
https://redd.it/1oenjfx
@r_bash
My First GitHub Project: A Handy Bash Directory Bookmark System
I just created a shell noscript for myself that I think others might find useful. It's my first time uploading something to GitHub, so if the README isn’t perfect, I apologize in advance!
The noscript is a **Bash directory bookmark system** that lets you save, manage, and quickly navigate frequently used directories. It supports:
* **Normal bookmarks** – for temporary or frequent use
* **Bound bookmarks** – for persistent, long-term directories
* Each bookmark can optionally have a **name** for easier navigation
* Bookmarks can be referenced by **index or name**
* Supports **absolute and relative paths**
I hope someone finds it useful and enjoys using it:
[https://github.com/tomertouitoumail-ops/cd-bookmark](https://github.com/tomertouitoumail-ops/cd-bookmark)
https://redd.it/1ofxp3o
@r_bash
I just created a shell noscript for myself that I think others might find useful. It's my first time uploading something to GitHub, so if the README isn’t perfect, I apologize in advance!
The noscript is a **Bash directory bookmark system** that lets you save, manage, and quickly navigate frequently used directories. It supports:
* **Normal bookmarks** – for temporary or frequent use
* **Bound bookmarks** – for persistent, long-term directories
* Each bookmark can optionally have a **name** for easier navigation
* Bookmarks can be referenced by **index or name**
* Supports **absolute and relative paths**
I hope someone finds it useful and enjoys using it:
[https://github.com/tomertouitoumail-ops/cd-bookmark](https://github.com/tomertouitoumail-ops/cd-bookmark)
https://redd.it/1ofxp3o
@r_bash
GitHub
GitHub - tomertouitoumail-ops/cd-bookmark: A powerful Bash directory bookmark system with normal and bound bookmarks, named bookmarks…
A powerful Bash directory bookmark system with normal and bound bookmarks, named bookmarks, and tab completion. - tomertouitoumail-ops/cd-bookmark
Bash Trek, a Retro Terminal Game
Perhaps older readers will be familiar with the old Star Trek terminal game), first written by Mike Mayfield in 1971. I first encountered a simple version on a Commodore PET in the early '80s. I found it quite addictive and wrote a BBC BASIC version myself in 1985. In 2002 I wrote one in C and more recently I've written one in Bash, which I've now uploaded to GitHub, here: https://github.com/StarShovel/bash-trek
Hope some may find it interesting.
https://preview.redd.it/iwg8lzq7knxf1.png?width=780&format=png&auto=webp&s=f5aedd77a2feb7fab44b729c2d9726f0888b1a9b
https://preview.redd.it/voo1pjmuknxf1.png?width=780&format=png&auto=webp&s=ea3c9678f68859563528a752cf63e8ca2586dbb9
https://redd.it/1ohdweb
@r_bash
Perhaps older readers will be familiar with the old Star Trek terminal game), first written by Mike Mayfield in 1971. I first encountered a simple version on a Commodore PET in the early '80s. I found it quite addictive and wrote a BBC BASIC version myself in 1985. In 2002 I wrote one in C and more recently I've written one in Bash, which I've now uploaded to GitHub, here: https://github.com/StarShovel/bash-trek
Hope some may find it interesting.
https://preview.redd.it/iwg8lzq7knxf1.png?width=780&format=png&auto=webp&s=f5aedd77a2feb7fab44b729c2d9726f0888b1a9b
https://preview.redd.it/voo1pjmuknxf1.png?width=780&format=png&auto=webp&s=ea3c9678f68859563528a752cf63e8ca2586dbb9
https://redd.it/1ohdweb
@r_bash
New Shell/Bash Roadmap at Roadmap.sh
Hi there! My name is Javier Canales, and I work as a content editor at roadmap.sh. For those who don't know, roadmap.sh is a community-driven website offering visual roadmaps, study plans, and guides to help developers navigate their career paths in technology.
We're planning to launch a brand new Shell/Bash Roadmap. It aims to be comprehensive, targeting Shell newbies and mature developers who may want a Shell refresh or to improve their fluency. However, we're not covering all the commands or topics out there, as we don't want to overwhelm users with excessive content.
Before launching the roadmap, we would like to ask the community for some help. Here's the link to the draft roadmap. We welcome your feedback, suggestions, and constructive input. If you have any suggestions for items to include or remove from the roadmap, please let me know.
Once we launch the official roadmap, we will start populating it with content and resources. Contributions will also be welcome on that side via GitHub :)
Hope this incoming roadmap will also be useful for you. Thanks very much in advance.
https://preview.redd.it/6q8z0gad1pxf1.png?width=1080&format=png&auto=webp&s=b96184d25fb7b92c6cf13b0e6a586c6229415b1c
https://redd.it/1ohlkfa
@r_bash
Hi there! My name is Javier Canales, and I work as a content editor at roadmap.sh. For those who don't know, roadmap.sh is a community-driven website offering visual roadmaps, study plans, and guides to help developers navigate their career paths in technology.
We're planning to launch a brand new Shell/Bash Roadmap. It aims to be comprehensive, targeting Shell newbies and mature developers who may want a Shell refresh or to improve their fluency. However, we're not covering all the commands or topics out there, as we don't want to overwhelm users with excessive content.
Before launching the roadmap, we would like to ask the community for some help. Here's the link to the draft roadmap. We welcome your feedback, suggestions, and constructive input. If you have any suggestions for items to include or remove from the roadmap, please let me know.
Once we launch the official roadmap, we will start populating it with content and resources. Contributions will also be welcome on that side via GitHub :)
Hope this incoming roadmap will also be useful for you. Thanks very much in advance.
https://preview.redd.it/6q8z0gad1pxf1.png?width=1080&format=png&auto=webp&s=b96184d25fb7b92c6cf13b0e6a586c6229415b1c
https://redd.it/1ohlkfa
@r_bash
roadmap.sh
Developer Roadmaps - roadmap.sh
Community driven roadmaps, articles and guides for developers to grow in their career.
A needed a pause function with a countdown timer, custom prompt and response, so I wrote one.
I needed a pause function for my noscripts so I thought I would write a pause noscript of my own that works similar to the pause function in Windows. I went a little above and beyond and added a timer function countdown in seconds (seconds are converted to 00h:00m:00s style format for extended times), and added the ability to enter custom prompt and response messages.
I know this is a bit superfluous but it was a fun project to learn about arguments and switches and how they are used, implemented and controlled within the noscript. This is free to use if anyone finds it helpful.
https://github.com/Grawmpy/pause.sh
https://redd.it/1oho8iq
@r_bash
I needed a pause function for my noscripts so I thought I would write a pause noscript of my own that works similar to the pause function in Windows. I went a little above and beyond and added a timer function countdown in seconds (seconds are converted to 00h:00m:00s style format for extended times), and added the ability to enter custom prompt and response messages.
I know this is a bit superfluous but it was a fun project to learn about arguments and switches and how they are used, implemented and controlled within the noscript. This is free to use if anyone finds it helpful.
https://github.com/Grawmpy/pause.sh
https://redd.it/1oho8iq
@r_bash
GitHub
GitHub - Grawmpy/pause.sh: Simple pause noscript that interrupts a program until either any key is pressed or the optional timer…
Simple pause noscript that interrupts a program until either any key is pressed or the optional timer (-t, --timer) reaches 00. Prompt text entry (-p, --prompt) and response (-r, --response) text ent...
Writing a bash noscript for post-install automatic configurations of a personal system.
Hello!
I'm trying to learn some simple bash noscripting and i made myself a project i'd like to do.
Here's the initial step: https://github.com/Veprovina/CarchyOS/blob/main/Carchyos.sh
It's a noscript that makes a minimal Arch linux into CachyOS hybrid with CachyOS repositories, kernel, and adds configurations specific to my system automatically so i don't have to do it. The goal much later would be to expand it to work on other OS, but this is as far as i've gotten now.
I did test it in a VM, and it works, but it's pretty basic or possibly wrong? I dont know what i'm doing. I didn't ask AI, nor do i want to, so i'm asking here if people can point me to the right direction so i can learn how to achieve all the things i wrote in the "to do" part, and to better understand how the ones i wrote already work.
For instance, i copied the "cat" part from a forum and modified it for my purposes, but idk why it does what it does. I know >> is append to file and > is new file (or rewrite existing file entirely), so maybe there's a more elegant solution to add new lines to an existing file, or write a new file that i just haven't found by googling. Or maybe printf is better than echo for some reason?
Like, i understand what the noscript does, but i might need some deeper understanding to add other stuff.
So far the noscript does:
\- echo every change about to happen in a colored line
\- copies and executes the cachyos noscript that changes the repositories and packages from arch to cacyhos
\- installs pacman packages
\- makes new directories for mount points, adds UUIDs of drives into fstab, then mounts them
\- makes an udev rule for a gamepad
Am i on the correct track or completely off the mark and that's not how it's done? I'd appreciate any insight, and pointing in the right direction, to some good beginner friendly documentation or tutorials so i can learn how to do this myself.
My end goal would be complete and automatic initial setup of the minimal system with one noscript.
https://redd.it/1ohusql
@r_bash
Hello!
I'm trying to learn some simple bash noscripting and i made myself a project i'd like to do.
Here's the initial step: https://github.com/Veprovina/CarchyOS/blob/main/Carchyos.sh
It's a noscript that makes a minimal Arch linux into CachyOS hybrid with CachyOS repositories, kernel, and adds configurations specific to my system automatically so i don't have to do it. The goal much later would be to expand it to work on other OS, but this is as far as i've gotten now.
I did test it in a VM, and it works, but it's pretty basic or possibly wrong? I dont know what i'm doing. I didn't ask AI, nor do i want to, so i'm asking here if people can point me to the right direction so i can learn how to achieve all the things i wrote in the "to do" part, and to better understand how the ones i wrote already work.
For instance, i copied the "cat" part from a forum and modified it for my purposes, but idk why it does what it does. I know >> is append to file and > is new file (or rewrite existing file entirely), so maybe there's a more elegant solution to add new lines to an existing file, or write a new file that i just haven't found by googling. Or maybe printf is better than echo for some reason?
Like, i understand what the noscript does, but i might need some deeper understanding to add other stuff.
So far the noscript does:
\- echo every change about to happen in a colored line
\- copies and executes the cachyos noscript that changes the repositories and packages from arch to cacyhos
\- installs pacman packages
\- makes new directories for mount points, adds UUIDs of drives into fstab, then mounts them
\- makes an udev rule for a gamepad
Am i on the correct track or completely off the mark and that's not how it's done? I'd appreciate any insight, and pointing in the right direction, to some good beginner friendly documentation or tutorials so i can learn how to do this myself.
My end goal would be complete and automatic initial setup of the minimal system with one noscript.
https://redd.it/1ohusql
@r_bash
GitHub
CarchyOS/Carchyos.sh at main · Veprovina/CarchyOS
Scripts to add CachyOS kernel and repositories into a minimal Arch installation. For personal and testing purposes. - Veprovina/CarchyOS
I started a small blog documenting lessons learned, and the first major post is on building reusable, modular Bash libraries (using functions, namespaces, and local)
I've started a new developer log to document lessons learned while working on my book (Bash: The Developer's Approach). The idea is to share the real-world path of an engineer trying to build robust software.
My latest post dives into modular Bash design.
We all know the pain of big, brittle utility noscripts. I break down how applying simple engineering concepts—like Single Responsibility and Encapsulation (via
Full breakdown here: https://www.lost-in-it.com/posts/designing-modular-bash-functions-namespaces-library-patterns/
It's small, but hopefully useful for anyone dealing with noscripting debt. Feedback and critiques are welcome.
https://redd.it/1oj3i2f
@r_bash
I've started a new developer log to document lessons learned while working on my book (Bash: The Developer's Approach). The idea is to share the real-world path of an engineer trying to build robust software.
My latest post dives into modular Bash design.
We all know the pain of big, brittle utility noscripts. I break down how applying simple engineering concepts—like Single Responsibility and Encapsulation (via
local)—can transform Bash into a maintainable language. It's about designing clear functions and building reusable libraries instead of long, monolithic noscripts.Full breakdown here: https://www.lost-in-it.com/posts/designing-modular-bash-functions-namespaces-library-patterns/
It's small, but hopefully useful for anyone dealing with noscripting debt. Feedback and critiques are welcome.
https://redd.it/1oj3i2f
@r_bash
Lost in IT | Kromg
Designing Modular Bash: Functions, Namespaces, and Library Patterns
Learn how to structure Bash code that scales with small functions, namespaces, and library patterns. Discover professional techniques for building reusable Bash libraries.
I want to put totp in my bash noscript
hey so as my noscript say i want to put totp in my noscript,
I am currently working on a project related to get access in servers so i want to use totp in bash which is allowing the user into server , currently i am sharing ssh key over telegram bot which is allowing the user into server but i want to replace it with totp.
Is there is any way i can put like on google authentictor , is google provide api for it ? if not os there is any tool for it ? and how to connect with any app to obtain otp and i will put the otp into the telegram which send it to my noscript in the server and will allow access
https://redd.it/1oj8ala
@r_bash
hey so as my noscript say i want to put totp in my noscript,
I am currently working on a project related to get access in servers so i want to use totp in bash which is allowing the user into server , currently i am sharing ssh key over telegram bot which is allowing the user into server but i want to replace it with totp.
Is there is any way i can put like on google authentictor , is google provide api for it ? if not os there is any tool for it ? and how to connect with any app to obtain otp and i will put the otp into the telegram which send it to my noscript in the server and will allow access
https://redd.it/1oj8ala
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community