Skip to content

gheorghitahurmuz/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

  • chezmoi
  • homebrew

Prerequisites

On MacOS:

xcode-select --install

Install chezmoi and dotfiles on a new machine

sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply gheorghitahurmuz

Fonts:

  • MonoLisa
  • Fira Code
  • Symbols Nerd Font Mono

Check this and this

Good practices in shell scripting

Specify the Bash Interpreter

To start a Bash script, it's a good practice to use a shebang line to specify the Bash interpreter. You can use the following line at the beginning of your script:

#!/usr/bin/env bash

Prevent Errors

set -eufo pipefail

Here's what each part of this line does:

  • e: This option causes the script to exit immediately if any command within it exits with a non-zero status, which helps catch errors early.
  • u: It treats the use of unset variables as errors, helping to avoid accidental use of uninitialized variables.
  • o pipefail: This part ensures that if any command in a pipeline (commands connected by "|") fails, the pipeline as a whole returns a non-zero status, ensuring proper error handling.

For more info, see this gist

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks