The /setalias Command
Instructions for Using the /setalias Command
/setalias CommandThe /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
Creates the folder if it does not exist.
Updates the
~/.folder_aliasesYAML file with the new alias and folder path.Notifies you when:
A folder is created.
An alias is successfully set.
Any errors occur during the process.
Examples
Setting a New Alias for a Non-Existing Folder:
/setalias reports ~/documents/reportsIf the folder
~/documents/reportsdoes not exist, it will be created automatically.Notifications:
Folder '/home/user/documents/reports' created successfully. Alias 'reports' set to '/home/user/documents/reports'
Setting an Alias for an Existing Folder:
/setalias logs ~/documents/logsIf the folder already exists, you'll get:
Alias 'logs' set to '/home/user/documents/logs'
Using the Alias in Other Commands: After setting the alias, you can use it in commands like
/markdownto save responses:/markdown 0 reportsThis 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/dataEnvironment 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