A Bash script with interactive TUI - by DavidBevi (not Antônio Oliveira's cdi)
❶ download cdi.sh, ❷ put in /usr/local/bin/, ❸ make the cdi alias. Here's a command that does all 3 steps:
sudo curl "https://raw.githubusercontent.com/DavidBevi/cdi/refs/heads/main/cdi.sh" -o "/usr/local/bin/cdi.sh" && echo -e '\nalias cdi=". /usr/local/bin/cdi.sh"' >> ~/.bashrc && . ~/.bashrcRun cdi with command cdi.
Details:
cdimust be sourced, that issource cdi.shor. cdi.sh.
With./cdi.shorbash cdi.sha sub-shell is created, andcdiwillcdthe sub-shell and exit.
To save you an headachecdionly works when sourced, and prints an helpful text otherwise.
Shells are programs that accepts textual commands, Bash is the most famous and popular Linux shell. Usually you might also call it "terminal", but the "terminal emulator" is the program that displays the input and output of the shell. You can change shell without changing terminal (or the opposite).
Run ps -p $$ -o comm=, if it doesn't print back bash you're not on Bash. But usually you can still enter Bash by running bash.
Run bash and work there: this command calls a sub-shell, from which you can do your normal stuff. You can return to the caller-shell with exit and usually with ctrl+d.
Run chsh -s /usr/bin/bash and type the superuser password (the one you type for sudo).
Antônio Oliveira in 2020 made cdi, which is inactive since then. My cdi is a complete rewrite, done because I wanted learn Bash scripting by building a script myself.
After doing so I was hoping to merge the 2 projects somehow, but Antônio kindly declined, so I'll do my best to maintain this cdi.
