Skip to content

Edit My Config is a plugin for Fish Shell.

License

Notifications You must be signed in to change notification settings

Oskar-Idland/emc.fish

 
 

Repository files navigation


Logo

emc.fish

Edit My Config


gitter badge releases badge fish version badge license badge

Table of Contents

Why

Edit My Config is a plugin for Fish Shell, it was made for those like me who are tired of typing long commands.

Features

Want more features? Please open an issue or send a pull request!

Installation

Install with Fisher (recommended):

fisher install Oskar-Idland/emc.fish

Usage

Call emc in your terminal with an option:

$ emc [<option>]

demo

Option Description
emc bash Opens the Bash config file.
emc fish Opens the Fish config file.
emc git Opens the Git config file.
emc gpg Opens the GPG config file.
emc gpga Opens the GPG agent config file.
emc nvim Opens the Neovim config file.
emc starship Opens the starship config file.
emc tmux Opens the tmux config file.
emc vim Opens the Vim config file.
emc zsh Opens the Zsh config file.
emc add <name> <path/to/file/from/home> Adds new option.
emc remove <name> Removes an option.
emc list List all options, including user added.
emc version Show the current version.
emc help Print help.

Customization

Using custom command

If you would like to customize emc default command, then set your own EMC_CMD universal variable. For example:

set --universal --export EMC_CMD ec

Alternatively, you can add the following line to your ~/.config/fish/config.fish:

set --export EMC_CMD ec

Using different editor

The default editor is VS Code, but if you would like to use a different one, then set your own EMC_EDITOR universal variable. For example:

set --universal --export EMC_EDITOR nvim

Alternatively, you can add the following line to your ~/.config/fish/config.fish:

set --export EMC_EDITOR nvim

Using custom config files

Using the add option, you can add your own config files to emc. For example:

❯ emc add foo .config/bar
Adding 'foo' at '.config/bar' to '~/.config/fish/conf.d/emc_options'

The add command assumes the file is in your home directory, so you don't need to add the full path.

If you are uncertain about everything you have added, you can list all options with the list option. For example:

❯ emc list
Option: bash
Config location: ~/.bashrc

Option: fish
Config location: ~/.config/fish/config.fish
[...]
Option: foo
Config location: ~/.config/bar

The option can be removed with the remove option. For example:

❯ emc remove foo
'foo' was removed from options in '~/.config/fish/conf.d/emc_options'

Contributing

If you are interested in helping contribute, please take a look at our contribution guidelines and open an issue or pull request.

Changelog

See CHANGELOG for a human-readable history of changes.

License

Distributed under the MIT License. See LICENSE for more information.

About

Edit My Config is a plugin for Fish Shell.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%