From e04f091704ae4e739594c76a6a887290f485019a Mon Sep 17 00:00:00 2001 From: Wessel Tip Date: Mon, 10 Nov 2025 11:42:39 +0100 Subject: [PATCH] feat(templates): Switch from md to norg --- fish/environments/templates/README.md | 71 ------------------------- fish/environments/templates/readme.norg | 60 +++++++++++++++++++++ 2 files changed, 60 insertions(+), 71 deletions(-) delete mode 100644 fish/environments/templates/README.md create mode 100644 fish/environments/templates/readme.norg diff --git a/fish/environments/templates/README.md b/fish/environments/templates/README.md deleted file mode 100644 index 820bd99..0000000 --- a/fish/environments/templates/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Exported Fish Environment: {{ENV_NAME}} - -This directory contains a self-contained Fish shell environment that can be used -without requiring the original Fish configuration. - -## Files Structure -``` -.fish/ -├── activate.fish # Main environment configuration -└── README.md # This file -``` - -## Usage - -### Automatic Activation (Recommended) -The environment will automatically activate when you `cd` into this directory -if your Fish shell is configured with the auto-activation feature that checks -for `.fish/activate.fish`. - -### Manual Activation -To manually activate the environment, run from the project root: -```bash -source ./.fish/activate.fish -``` - -### Deactivation -To deactivate the environment, run: -```bash -env deactivate -``` - -Or simply `cd` to a different directory if using auto-activation. - -## What This Environment Provides - -- Custom prompt showing the environment name -- Environment-specific aliases and functions -- Custom environment variables -- Automatic cleanup when deactivated - -## Requirements - -- Fish shell -- If this is a ROS2 environment: `bass` plugin (`fisher install edc/bass`) - -## Sharing - -This environment is completely self-contained. You can: -1. Copy this directory to another machine -2. Share it with other Fish shell users -3. Version control it with your project (add .fish/ to your repo) - -The environment will work on any system with Fish shell, regardless of whether -they have the original environment management system installed. - -## Auto-activation Setup - -To enable auto-activation for .fish/activate.fish, add this to your Fish config.fish: -```fish -function check_and_source_activate - if test -f (pwd)/.fish/activate.fish - source (pwd)/.fish/activate.fish - elif test -f (pwd)/activate.fish - source (pwd)/activate.fish - end -end - -function cd - builtin cd $argv && check_and_source_activate -end -``` \ No newline at end of file diff --git a/fish/environments/templates/readme.norg b/fish/environments/templates/readme.norg new file mode 100644 index 0000000..639f06a --- /dev/null +++ b/fish/environments/templates/readme.norg @@ -0,0 +1,60 @@ +* Exported Fish Environment: {{ENV_NAME}} +This directory contains a self-contained fish environment. + +** Files Structure + @code + .fish/ + |-- activate.fish + |-- readme.norg + |-- bin/ + @end + +** Usage + +*** Automatic Activation (Recommended) + The environment will automatically activate when you `cd` into this directory + if your Fish shell is configured with the auto-activation script. + + @code fish + function check_and_source_activate + if test -f (pwd)/.fish/activate.fish + source (pwd)/.fish/activate.fish + elif test -f (pwd)/activate.fish + source (pwd)/activate.fish + end + end + + function cd + builtin cd $argv && check_and_source_activate + end + @end + +*** Manual Activation + To manually activate the environment, run from the project root: + @code bash + source ./.fish/activate.fish + @end + +*** Deactivation + To deactivate the environment, run: + @code bash + env deactivate + @end + + Or simply `cd` to a different directory if using auto-activation. + +** What This Environment Provides + - Prompt showing the environment name + - Environment-specific aliases and functions + - Custom environment variables + - Automatic cleanup when deactivated + +** Requirements + - Fish shell + - `bass` plugin (`fisher install edc/bass`) for compatibility with bash scripts + +** Sharing + This environment is completely self-contained. You can: + - Copy this directory to another machine + - Share it with others + - Version control it with your project (add .fish/ to your repo) \ No newline at end of file