Skip to content
/ fycu Public

Fish You Could Use. A complete rewrite of fish-you-should-use

License

Notifications You must be signed in to change notification settings

NovaViper/fycu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FYCU - Fish You Could Use

intro img

A fish plugin that reminds you to use your aliases and abbreviations! FYCU (pronounced FEYE-COO) is a complete rewrite of the original Fish You Should Use plugin with bug fixes and new features.

Table of Contents

Noted

The plugin is in very active development and is considered in an alpha state, so there will be bugs! You have been warned

Installation

Fisher

fisher install NovaViper/fycu

NixOS

NixOS Module

(TBA)

Home-Manager module

home-manager.users.USER = {
    programs.fish.plugins = [
        {
            name = "fycu";
            src = pkgs.fetchFromGitHub {
                owner = "NovaViper";
                repo = "fycu";
                rev = "OBTAIN FROM GITHUB";
                hash = "OBTAIN WITH `nix-prefetch-url https://github.com/NovaViper/fycu`";
            };
        }
    ];
};

Usage

You don't need to do anything extra! Once the plugin's installed, fycu will let you know if you wrote a command that has an existing alias or abbreviation. Also, with the way fish shell aliases function, fycu cannot tell a local from a global alias/abbreviation.

fycu demo

fycu can detect git aliases

git alias demo

and abbreviations!

abbr demo

Configuration

Message Position

By default, fycu will display its reminder messages before a command has executed. However, you can change it to display after a command has executed by setting the value of FYCU_MESSAGE_POSITION.

set --global FYCU_MESSAGE_POSITION "after"

Enable Experimental Abbreviation Support

Since there are still pressing bugs in the abbreviation detection, I've left the mode disabled with FYCU_ENABLE_ABBR set to false. If you wish to try it out, then simply set it to true

Disable Hints for Specific Aliases/Abbreviations

You can tell fycu to permanently ignore certain aliases/abbreviations with a couple of different options:

You can set FYCU_IGNORED_ALIASES for standard aliases

set --global FYCU_IGNORED_ALIASES "ls,fd"

set FYCU_IGNORED_GIT_ALIASES for git aliases

set --global FYCU_IGNORED_GIT_ALIASES "reword,rewrite"

and FYCU_IGNORED_GIT_ALIASES for abbreviations.

set --global FYCU_IGNORED_ABBRS "jd,n"

These variables are verified while using the plugin (when the respective check function). The _fycu_verify_ignored FYCU_IGNORED_* function can also be manually executed by calling it again and giving it the name of the ignore type in the session. If the variables are formatted correctly, then there will be no errors logged in the terminal.

Hardcore Mode

Not implemented, or may not be implemented due to issues noted in TODO

Contributing

Pull Requests and Feedback are welcomed!

This is my very first fish plugin so there are bound to be bugs so feel free to open an issue or open a pull request! I also have a TODO list for upcoming features I plan to add.

Credits

The plugin's development wouldn't have been possible without Llakala's help! Additionally: