How to use the command mysides (with examples)

How to use the command mysides (with examples)

  • Osx
  • December 25, 2023

The mysides command is a utility that allows users to add, list, and remove items from the Finder sidebar favorites on macOS. This command provides a command-line interface to manage the favorites, making it easy to customize and organize the Finder sidebar. It is especially helpful for power users who prefer to manage their favorites from the command line.

Use case 1: List sidebar favorites

Code:

mysides list

Motivation: This use case is useful when you want to see the current list of sidebar favorites in the Finder. By running this command, you can quickly view the items you have added to the sidebar.

Explanation: The mysides command followed by “list” will display a list of all the sidebar favorites in the Finder.

Example output:

example    file:///Users/Shared/example

Use case 2: Add a new item to the end of the sidebar favorites

Code:

mysides add example file:///Users/Shared/example

Motivation: If you frequently access a specific file or folder, you may want to add it to the Finder sidebar for quick and easy access. This use case allows you to add a new item to the end of the sidebar favorites.

Explanation: The mysides command followed by “add” is used to add a new item to the sidebar. In this example, “example” is the name of the item, and “file:///Users/Shared/example” is the URL or path to the item.

Example output: No output if the process is successful.

Use case 3: Remove an item by name

Code:

mysides remove example

Motivation: If you no longer need a specific item in the sidebar, you can remove it using this use case. Removing unused items can help declutter the sidebar.

Explanation: The mysides command followed by “remove” is used to remove an item from the sidebar. In this example, “example” is the name of the item to be removed.

Example output: No output if the process is successful.

Use case 4: Add the current directory to the sidebar

Code:

mysides add $(basename $(pwd)) file:///$(pwd)

Motivation: When working with different directories, it can be convenient to add the current directory to the sidebar for easy access. This use case automatically adds the current directory without manually specifying the name or path.

Explanation: The mysides command followed by “add” is used to add a new item to the sidebar. $(basename $(pwd)) retrieves the name of the current directory, and $(pwd) retrieves the path.

Example output: No output if the process is successful.

Use case 5: Remove the current directory from the sidebar

Code:

mysides remove $(basename $(pwd))

Motivation: If you no longer need the current directory in the sidebar, you can remove it using this use case. Removing unused directories can help keep the sidebar organized.

Explanation: The mysides command followed by “remove” is used to remove an item from the sidebar. $(basename $(pwd)) retrieves the name of the current directory.

Example output: No output if the process is successful.

Conclusion:

The mysides command provides a convenient way to manage the Finder sidebar favorites from the command line. Whether you want to view, add, or remove items, this command allows for easy customization and organization of the sidebar. By using these examples, you can simplify your workflow and personalize your Finder experience.

Related Posts

How to use the command 'ahost' (with examples)

How to use the command 'ahost' (with examples)

The ‘ahost’ command is a DNS lookup utility that allows users to display the A or AAAA record linked with a hostname or IP address.

Read More
Using the r2e command for RSS feed to email forwarding (with examples)

Using the r2e command for RSS feed to email forwarding (with examples)

1: Creating a new feed database that sends email to an email address Code:

Read More
How to use the command git am (with examples)

How to use the command git am (with examples)

The git am command is used to apply patch files and create a commit.

Read More