I want to share my list of aliases, functions and scripts with a friend
Sometimes it's good to share your own useful commands and scripts with your friends or coworkers.
Imagine you have a common alias file, .k8s_commands
, and a script,
.connect_to_staging_db.sh
.
They're both stored in GitHub and registered in bee
.
If you invoke:
bee -ls
that will make Bee print details about all of the registered sources, in JSON format:
[
{
"Name": ".k8s_commands",
"Path": "https://path/in/github/.k8s_commands",
},
{
"Name": ".connect_to_staging_db.sh",
"Path": "https://path/in/github/.connect_to_staging_db.sh",
},
]
You can pipe this to a file:
bee -ls > $HOME/.my_sources.json
and move to a Git repo:
mv $HOME/.my_sources.json /path/to/some/git/repo/.my_sources.json
You can learn more about importing this file here.
Ideally, the paths you want to export are all accessible through a network. Local paths won't work on another user's
machine.