Hi,
It turns out that is the function creating the url that is not working as I
expected. This is the actual code:
function vip
vagrant ssh $argv[1] -c "ifconfig eth1 | sed -ne 's/.*inet
addr:\(\S*\)\s*Bcast.*/\1/p'" \
^ /dev/null
end
Using it gives:
$ vip
192.168.233.170
But running:
$ open "http://"(vip)
Usage: open [-e] [-t] [-f] [-W] ...
Any ideas?
// Rickard
On Wed, Aug 20, 2014 at 2:19 PM, Cedric Auger <sedri...@gmail.com> wrote:
> Works perfectly for me:
> -----------------------------
> Welcome to fish, the friendly interactive shell
> Type help for instructions on how to use fish
> cauger@cauger-PNR ~> function url
> echo "some url"
> end
> cauger@cauger-PNR ~> open (url)/index.html
> xdg-open: file 'some url/index.html' does not exist
> cauger@cauger-PNR ~>
> ----------------------------
> Have you tried to run it in some interactive shell, in a script or
> somewhere else?
>
>
>
> 2014-08-20 13:14 GMT+02:00 Rickard von Essen <rickard.von.es...@gmail.com>
> :
>
>> Hi,
>>
>> If i have a function that computes an URL, say:
>>
>> function url
>> echo "some url"
>> end
>>
>> Then I want to use it in a command substitution. Something like:
>>
>> open (url)/index.html
>>
>> but (url) is expanded to empty string. How should I do this?
>>
>> Regards
>> Rickard von Essen
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Slashdot TV.
>> Video for Nerds. Stuff that matters.
>> http://tv.slashdot.org/
>> _______________________________________________
>> Fish-users mailing list
>> Fish-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fish-users
>>
>>
>
>
> --
> .../Sedrikov\...
>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users