CDPATH The search path for the cd command. This is a
colon-separated list of directories in which the
shell looks for destination directories specified by
the cd command. A sample value is ".:~:/usr".
EG put all your projects in a project directory, add it to your CDPATH, and you can tab complete your project directory names with cd from any path any time.
One thing I do in my own laptop is make a separate account for my work user and another one for my personal user. That way I don't need to worry about one thing interfering with the other.
Great post and idea! I recently got into shell scripts as well trying to automate some stuff.
Not yet ready to share the full code because is quite trashy 👀 but this is a little snippet making, changing, and opening a directory in code for a fresh new project.
# MKDIR with the inputted name. If already exists, just ignore, continue anyways
tput setaf 0;echo-n"Creating directory... "mkdir$flpath
tput setaf 2;echo"done."# CD to the inputted folder
tput setaf 0;echo-n"Changing directory... "cd$flpath
tput setaf 2;echo"done."# OPEN CODE from the folder
tput setaf 0;echo-n"Opening VS Code... "
code -n.
tput setaf 2;echo"done."
Really loved finding out about tput setaf changing the color of the text in the terminal, it makes it look cooler.
Also nice trick source ~/.new-sh-script.sh in the zsh config file and it loads the new (or any other function) in the terminal as a command.
I do something similar on may Mac using Alfred - I just enter 'work' and it pops open all my email, editor, browser and Slack/Teams, etc. Lazy for the win!
Great Article. A note for people who use Macbook's, you can use Automator tool which is inbuilt inside the system. Will really help you avoid 5-6 clicks in the morning.
This changed my life with
bash:EG put all your projects in a project directory, add it to your
CDPATH, and you can tab complete your project directory names withcdfrom any path any time.One thing I do in my own laptop is make a separate account for my work user and another one for my personal user. That way I don't need to worry about one thing interfering with the other.
That's a good idea as well
Great post and idea! I recently got into shell scripts as well trying to automate some stuff.
Not yet ready to share the full code because is quite trashy 👀 but this is a little snippet making, changing, and opening a directory in code for a fresh new project.
Really loved finding out about tput setaf changing the color of the text in the terminal, it makes it look cooler.
Also nice trick
source ~/.new-sh-script.shin the zsh config file and it loads thenew(or any other function) in the terminal as a command.This is really cool! That's gonna be a very useful script. I look forward to seeing the final result 😄
Well, that is especially helpful while working from home.
8:59 AM - Home
9:00 AM - Work!!
Cool post! I usually put all my command in one python script, and run it after opening my workstation.
Did something similar to this - automation for the win! Saves a ton of time as well.
Reading this article makes me want to automate my whole workflow it would save me a ton of time that would be better spent doing other things.
I do something similar on may Mac using Alfred - I just enter 'work' and it pops open all my email, editor, browser and Slack/Teams, etc. Lazy for the win!
That's awesome! I tried using Alfred some time ago but couldn't get used to it.
This is very neat and really productive. thanks
Thanks for this information! 😊
My favorite one 🤓
Thanks for reading Pavel 😄
Great Article. A note for people who use Macbook's, you can use Automator tool which is inbuilt inside the system. Will really help you avoid 5-6 clicks in the morning.
I'll have to take a look at the automator, thanks
I do this too! I also start a toggl timer via their rest api. And I create standard 'getting started' checklist via the todoist.
Nice! I also have similar startup script except I use browser's built in tab restore feature to restore my browser session with all tabs.
kudos