On 9/11/06, Jason Grossman <[EMAIL PROTECTED]> wrote:
>
> On 11/09/2006, at 8:59 pm, Axel Liljencrantz wrote:
>
> > You can get pretty much exactly the functionality you want alreay,
> > though you have to do a bit more writing. Specifically, instead of
> > storing function definitions in ~/.fish, use files in the directory
> > ~/.fish.d/functions. (You will have to create this directory yourself)
>
> I know.  It's a great system.  But I think your proposed function -S
> syntax is much nicer for defining small functions (while the existing
> method will remain useful for sysadmins, as you say, and no doubt for
> other purposes as well).

As you say, the -S syntax is shorter, which was why I implemented it.
There is a middle ground as well, though. As proposed earlier in this
thread, one could define a function:

function save_function
    for i in $argv
        functions $i >~/.fish.d/functions/$i.fish
    end
end

to make the effort of 'saving' a function much smaller without
bloating the shell with more features. I'm not sure yet, but I'm
leaning towards including a function like that with fish, so that you
can simply issue a command like 'save_function foo' once the 'foo'
function works the way you want. Slightly more verbose, but less bloat
in the shell.

>
> (Admittedly, one reason I don't use the existing method much is the
> rather specific and temporary reason that I've started using a
> computer which doesn't have a ~ key, and I haven't yet got around to
> defining one!)

You can replace ~ with $HOME. More verbose, but most keyboards have a
$ character! :)

>
> Jason
>

-- 
Axel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to