yes, it's me, liza 🇵🇷 🦛 🦦 on Nostr: #BASH NERDLETTES! am trying to understand why y'all say «mkdir -p -- "$1" && cd -- ...
#BASH NERDLETTES!
am trying to understand why y'all say «mkdir -p -- "$1" && cd -- "$1"» works.
i have something like this for creating site folders in Backdrop & Drupal multisite installations.
the scripts DO create the folders and update & copy all the files that go into them; but it bothers me that the terminal prompt never switches me into the folder.
my expectation is that "cd" moves my prompt into the new folder, not the bash process.
so is that what's happening when in a function?
am trying to understand why y'all say «mkdir -p -- "$1" && cd -- "$1"» works.
i have something like this for creating site folders in Backdrop & Drupal multisite installations.
the scripts DO create the folders and update & copy all the files that go into them; but it bothers me that the terminal prompt never switches me into the folder.
my expectation is that "cd" moves my prompt into the new folder, not the bash process.
so is that what's happening when in a function?