On Tue, Jun 28, 2016 at 2:24 PM, Pito Salas <pitosa...@gmail.com> wrote:

> I guess one question is, does it matter if the syntax of the text I write
> in the editor is correct?
>
> And related, am I writing a function body or a whole function? And if the
> names don’t match?
>

You're writing a whole function. If you run "funced" with a function name
not already defined it should open your editor with an empty function
template; e.g., running "funced abc" puts me in the editor with this
content:

function abc

end


> Here’s what I am adding to the text editor:
>
> function myfunc
> echo “hello world”
> end
>

Did you run "funced myfunc"?


> Another observation, the command “funced myfunc” returns right away, and
> only 1/2 second later does Atom’s window open. Is that a clue?
>

You need to configure your editor to stay in the foreground. For example,
when using the Vim GUI via "vim -g" or "gvim" you also need the "-f" flag
to keep it in the foreground.

Also, as others have pointed out, you need to run "funcsave" if you want
your edited function to be saved to your ~/.config/fish/functions directory
so it is available to other fish sessions.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to