Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Thunderbird/73.0
On 29/02/2020 20:20, Tamir Carmeli wrote:
I suggest to add a "-c, --change_dir" flag to mkdir.
This could shorten commands such as "mkdir awesome_dir && cd awesome_dir".
I tried looking if someone has already made this suggestion and
couldn't find any.
If someone thinks it's a good idea I am willing to work on a patch.
It wouldn't work within mkdir, because as soon as that process exits
the working directory would revert back to that of its parent.
I use the following function, setup in my .bashrc:
md () { mkdir -p "$1" && cd "$1"; }
cheers,
Pádraig