The /setalias Command

Instructions for Using the /setalias Command

The /setalias command allows you to dynamically set folder aliases for saving files within the chat application. This makes it easy to quickly configure and manage file storage locations for different purposes.

Command Format

/setalias [alias] [folder_path]
  • alias: The name you want to assign to the folder. This is how you will refer to it later.

  • folder_path: The full path to the folder where you want to save your files.

How It Works

  1. Creates the folder if it does not exist.

  2. Updates the ~/.folder_aliases YAML file with the new alias and folder path.

  3. Notifies you when:

    • A folder is created.

    • An alias is successfully set.

    • Any errors occur during the process.

Examples

  1. Setting a New Alias for a Non-Existing Folder:

    /setalias reports ~/documents/reports
    • If the folder ~/documents/reports does not exist, it will be created automatically.

    • Notifications:

      Folder '/home/user/documents/reports' created successfully.
      Alias 'reports' set to '/home/user/documents/reports'
  2. Setting an Alias for an Existing Folder:

    /setalias logs ~/documents/logs
    • If the folder already exists, you'll get:

      Alias 'logs' set to '/home/user/documents/logs'
  3. Using the Alias in Other Commands: After setting the alias, you can use it in commands like /markdown to save responses:

    /markdown 0 reports
    • This will save the latest model response to the folder associated with the alias reports.

Important Notes

  • Absolute Paths: Always use absolute paths when specifying the folder_path. For example:

    /setalias data /home/user/project/data
  • Environment Variables: You can use ~ to represent your home directory.

  • Folder Creation: The application will automatically create the folder if it doesn’t exist, so you don’t need to manually set it up.

Error Handling

  • If the folder cannot be created due to permission issues or invalid paths, you will receive a notification:

    Error creating folder '/invalid/path': [error details]
  • If an error occurs while updating the alias file:

    Error saving folder alias: [error details]

Use the /setalias command to streamline your workflow and keep your files organized effortlessly!

Last updated