Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add magic-enter plugin #110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add magic-enter plugin #110

wants to merge 1 commit into from

Conversation

mattmc3
Copy link

@mattmc3 mattmc3 commented Nov 23, 2021

Added Magic-Enter to the plugin list. For OMZ users, this is the fish version of this plugin: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/magic-enter

@mattmc3 mattmc3 closed this Dec 19, 2022
@BarbzYHOOL
Copy link
Contributor

where is the fish version?

@catgofire
Copy link

@BarbzYHOOL
Copy link
Contributor

@BarbzYHOOL https://github.com/mattmc3/magic-enter.fish

thanks i'm dumb, proof that i didn't code for a long time
This is an interesting plugin idea, the command to run should be configurable though

btw how did you get that notification about my comment?

@mattmc3
Copy link
Author

mattmc3 commented Dec 22, 2022

It's absolutely configurable. Just write your own magic-enter-cmd function:

function magic-enter-cmd --description "Print the command to run when no command was given"
    if command git rev-parse --is-inside-work-tree &>/dev/null
        echo "echo TODO: git command here"
    else
        echo "echo TODO: command here"
    end
end

@mattmc3 mattmc3 reopened this Dec 22, 2022
@BarbzYHOOL
Copy link
Contributor

you mean rewrite the function inside the plugin file?

@mattmc3
Copy link
Author

mattmc3 commented Dec 22, 2022

No, in your own fish functions directory. It's the same way you would override any function in fish - for example, similar to how you customize your fish_prompt.

@jorgebucaran
Copy link
Owner

Hey Matt! I do think this might be useful, but not sure how yet. The documentation could use some refining before we move forward. Not sure if I'd use this just to run ls with each enter, but there might be potential for more. Thanks for working on this! Keeping this open for now.

mattmc3 added a commit to mattmc3/magic-enter.fish that referenced this pull request May 1, 2023
- [Per comment here](jorgebucaran/awsm.fish#110 (comment)),
this plugin documentation needed a bit more. Good call.
@mattmc3
Copy link
Author

mattmc3 commented May 1, 2023

Hello Jorge - as always, thank you - you're absolutely right that this plugin needed a bit more in the README. I've enhanced it - let me know if there's anything else I can do to make it clearer/more useful. It's one of my favorite simple OMZ plugins, so having a similar one in Fish has been a must-have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants