Workspaces/Advanced Features/ws register
Jump to navigation
Jump to search
ws_register - Register Workspace Links
The ws_register command creates or updates symbolic links to your workspaces in a directory of your choice. This provides a convenient way to access all your workspaces from a single location.
Syntax
ws_register [-h] [--version] [-F FILESYSTEM] directory
Usage
$ ws_register ~/workspaces
This will create symbolic links to all your workspaces in the ~/workspaces directory. The command creates subdirectories for each filesystem (e.g., scratch/) and places workspace links inside them.
Example:
$ mkdir -p ~/my_workspaces $ ws_register ~/my_workspaces $ ls -l ~/my_workspaces/scratch/ lrwxrwxrwx 1 user group 45 Nov 17 10:30 user-myWs -> /work/workspace/scratch/user-myWs-0 lrwxrwxrwx 1 user group 48 Nov 17 10:30 user-project1 -> /work/workspace/scratch/user-project1-0
Note: Links use the full workspace names (including username prefix), organized by filesystem subdirectory.
Options
| Option | Description |
|---|---|
| directory | Directory in which links shall be created/updated (required positional argument) |
| -F <filesystem>, --filesystem <filesystem> | Filesystem to search workspaces in. Only create links for workspaces on this filesystem |
| -h, --help | Show help message |
| --version | Show program's version number and exit |
When to use
- Recommended if you work with multiple workspaces and want quick access
- Use in your ~/.bashrc or login scripts to automatically update links at login
- Useful for organizing workspaces by project or purpose
Example in login script
# In ~/.bashrc or ~/.profile
# Only run in interactive shells to avoid issues with scp, rsync, etc.
if [ -t 0 ] && [ -z "$SSH_ORIGINAL_COMMAND" ] && command -v ws_register >/dev/null 2>&1; then
mkdir -p ~/workspaces >/dev/null 2>&1
ws_register ~/workspaces >/dev/null 2>&1
fi
For more information: $ ws_register -h or man ws_register