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 -e option to funced #187

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@maxfl
Contributor

maxfl commented Jun 27, 2012

New option -e or --editor allows to edit function inside external
editor, rather than in reader.

It uses $EDITOR variable, or tries to use first existing terminal editor from the list:
edit nano pico joe mcedit vim vi
Are there other editors could be added to the list? Or other ways to figure it out?

It also uses mktemp command, which I suppose to be on all unix systems. Or not?

Add -e option to funced
New option -e or --editor allows to edit function inside external
editor, rather than in reader.
@siteshwar

This comment has been minimized.

Show comment
Hide comment
@siteshwar

siteshwar Jun 27, 2012

Member

May be add emacs !

Member

siteshwar commented Jun 27, 2012

May be add emacs !

@siteshwar

This comment has been minimized.

Show comment
Hide comment
@siteshwar

siteshwar Jun 29, 2012

Member

Great work maxfl! Just one request, right now we are using external editor with "-e" option, we want to make external editor first choice and editing functions through shell could be done by passing option like "--shell" or "--no-editor" ( or find a better one).

Member

siteshwar commented Jun 29, 2012

Great work maxfl! Just one request, right now we are using external editor with "-e" option, we want to make external editor first choice and editing functions through shell could be done by passing option like "--shell" or "--no-editor" ( or find a better one).

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jun 30, 2012

Member

Merged with rebase with this set of commits:

To git@github.com:fish-shell/fish-shell.git
40e4f49..3ab26a5 master -> master

I changed the behavior to always default to $EDITOR if set.
Thanks for the great feature!

Member

ridiculousfish commented Jun 30, 2012

Merged with rebase with this set of commits:

To git@github.com:fish-shell/fish-shell.git
40e4f49..3ab26a5 master -> master

I changed the behavior to always default to $EDITOR if set.
Thanks for the great feature!

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jun 30, 2012

Member

I also changed it to not use mktemp, which works differently (or not at all) on different OSes

Member

ridiculousfish commented Jun 30, 2012

I also changed it to not use mktemp, which works differently (or not at all) on different OSes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment