.local-bin/docs/wzp/Usage.md
2024-05-31 14:21:49 -04:00

1.3 KiB
Executable file

wezterm_project_starter

This script automates the process of starting a new Wezterm project. It allows you to select a project from a predefined list or specify a project name as an argument.

Usage

Run the script without any arguments to select a project from the list of available projects. Alternatively, you can provide a project name as an argument to start that specific project.

./wezterm_project_starter.sh [project_name]

Example Usage

  1. Select a project from the list:
./wezterm_project_starter.sh
  1. Start a specific project:
./wezterm_project_starter.sh my_project

Script Details

  • The script sets the PROJECTS_DIR to ~/.config/wezterm/projects.
  • If no argument is provided, the script lists all .lua files in the PROJECTS_DIR and allows the user to select one using fzf.
  • If an argument is provided, the script checks if the corresponding .lua file exists in the PROJECTS_DIR.
  • If a project is selected or specified, the script sets the WZ_PROJECT environment variable and starts Wezterm with the selected project.

Notes

  • Ensure fd and fzf are installed on your system (brew install fd fzf on macOS).
  • The script relies on the presence of .lua files in the PROJECTS_DIR to list and start projects.