Welcome to fish-x
, a Fish shell plugin that enhances your shell experience with upgraded commands on top of regular commands. Typically normal commands that ends with x
.
mkdirx
- Make a directory and cd into it.touchx
- Touch a new file and open in preferred editor.gclx
- Git clone a repository and cd into it.
This plugin has no intention to wrap around normal commands. E.g. wrap around
mkdir
to make it auto cd. There might be alot internal use cases for these common commands. Just type anx
for a slight quality of improvement in life.
{
programs.fish = {
enable = true;
plugins = [
{
name = "fish-x";
src = pkgs.fetchFromGitHub {
owner = "y3owk1n";
repo = "fish-x";
rev = "v1.2.0";
sha256 = "generated-sha-256-values";
};
}
];
};
}
fisher install y3owk1n/fish-x
- Clone this repository:
git clone https://github.com/y3owk1n/fish-x.git
- Source the all the functions/*.fish file in your Fish configuration:
source /path/to/gclx.fish
source /path/to/mkdirx.fish
source /path/to/touchx.fish
The gclx
function simplifies the process of cloning a Git repository and navigating into it with a single command.
gclx owner/repo
or
gclx https://github.com/owner/repo.git
We support --bare
flag for worktree users like me.
gclx --bare owner/repo
The mkdirx
function combines creating a directory and changing into it in a single command, streamlining your workflow.
mkdirx [folder-name]
The touchx
function creates or updates a file and opens it in your preferred editor, ensuring a seamless editing experience.
touchx [file-name]
Before using touchx
, ensure that your preferred editor is set in the $EDITOR environment variable. You can set it using:
set -Ux EDITOR nvim # vim, code, emacs, etc.
If you encounter any issues or errors, please refer to the troubleshooting section in the wiki (Not ready yet).
Feel free to contribute by opening issues, suggesting enhancements, or submitting pull requests. We value your feedback and ideas to enhance the capabilities of fish-x
further!
This plugin is licensed under the MIT License. Feel free to use, modify, and distribute it as you see fit.
Happy fishing! π