prof
is a command-line tool for managing bash profiles. It allows you to organize and manage custom .bash_profile
contents by creating and editing profiles, setting load order, exporting and importing profiles, and more.
To install prof
, you can follow these steps:
-
Download the latest release of
prof
from the command line or from the GitHub release page.wget https://github.com/blbynum/prof/releases/download/v1.1.4/prof
-
Make the
prof
file executable:chmod +x prof
-
(Optional) Copy the
prof
file to a directory in your PATH to make it globally accessible:cp prof /usr/local/bin
Now you're ready to use prof
!
To use prof
, you can run the following command:
prof <command> [arguments]
For detailed information on available commands and their usage, you can refer to the Commands section below.
Creates a new profile with the specified name and load order.
prof create <profile_name> <load_order>
Opens an existing profile in your preferred text editor for editing. Optionally, you can update the load order of the profile by providing a new load order as the second argument.
prof edit <profile_name> [new_load_order]
Deletes an existing profile. This action is irreversible.
prof delete <profile_name>
Lists all available profiles along with their load order.
prof list
Exports a profile to the specified export directory.
prof export <profile_name> <export_directory>
Imports a profile from the specified file with the specified load order.
prof import <profile_file> <load_order>
Installs prof
by adding the code to load profiles to the target file (~/.bash_profile
by default).
prof install [target_file]
Updates prof to the latest version.
prof update
Displays the help message with information on available commands.
prof help
Here are some examples of how you can use prof
:
-
Create a new profile named "work" with a load order of 10:
prof create work 10
-
Edit an existing profile named "personal":
prof edit personal
-
Delete a profile named "old" (with confirmation prompt):
prof delete old
-
List all available profiles:
prof list
-
Export a profile named "dev" to the "~/exports" directory:
prof export dev ~/exports
-
Import a profile from a file named "myprofile" with a load order of 5:
prof import myprofile 5
-
Install
prof
by adding the code to load profiles to a custom target file:prof install ~/.bashrc
-
Update
prof
to the latest version:prof update
For more details on each command and its usage, refer to the Usage section above.
Upgrade Instructions:
- Download the latest release from the GitHub repository.
- Replace your existing prof file with the new version.
- Update your existing profiles to include the new loading message by running the following script:
- Download the migration script from this link.
- Open a terminal and navigate to the directory where you downloaded the script.
- Make the script executable with the command:
chmod +x profiles_migration_1.1.0.sh
. - Run the script with the command:
./profiles_migration_1.1.0.sh
. - The script will add the loading message to each existing profile that does not already contain it.