I think Fish command substitutions are treated as background processes. It
looks like the `ssh` command is being stopped (see `jobs`), and if you resume
it, it complains that tcsetattr() was interrupted. The documentation on
tcsetattr() says:
> Unless otherwise noted for a specific command, the
Ok, thanks for all support.
To summarise, the problem comes from the pseudo-tty assignment in ssh. When
something in a command substitution (command) assign a pseudo-tty fish
replaces this with nothing (and actually swallow surrounding text ?!).
Disabling pseudo-tty allocation solves this.
For re
This got me at first too. Command substitution returns a *list*, not just a
string. When you prefix a list with a string ("http://";), that string is
prefixed onto each member of the list:
$ function tmp; echo 1; echo 2; echo 3; end
$ echo "foo"(tmp)
foo1 foo2 foo3
If the list is empty, the strin
> On Wed, Aug 20, 2014 at 3:05 PM, Glenn Jackman
wrote:
>>
>> This got me at first too. Command substitution returns a *list*, not just
>> a string. When you prefix a list with a string ("http://";), that string
is
>> prefixed onto each member of the list:
>>
>> $ function tmp; echo 1; echo 2; ech
Sorry, replying to all this time:
I can actually reproduce this without vagrant.
>From skimming the source, vagrant expands to something like:
ssh -t "/bin/bash -c ''"
so, my equivalent function is:
function x_test
ssh -t "/bin/bash -c 'echo hi'" ^ /dev/null
end
If i define this, an
What is strange is that
$ echo "http://";(vip)
outputs only a new line. I would expect it to at least printout:
http://
// Rickard
On Wed, Aug 20, 2014 at 3:27 PM, Stestagg wrote:
> My guess would be something to do with how stdout is being
> captured/ssh/vagrant weirdness
>
> It might be wort
I do not know of the "vagrant" command. Does it really output data to
stdout? (and not stderr, for instance)
What does:
$ echo "http://";(vip)
outputs?
2014-08-20 15:19 GMT+02:00 Rickard von Essen :
> Hi,
>
> It turns out that is the function creating the url that is not working as
> I expect
To boil it down a bit. Why is this having as it does:
$ vip ^/dev/null
192.168.233.170
$ echo "ip:"(vip)"-"
$
On Wed, Aug 20, 2014 at 3:19 PM, Rickard von Essen <
rickard.von.es...@gmail.com> wrote:
> Hi,
>
> It turns out that is the function creating the url that is not working as
> I expecte
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:
$ o
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-op
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
11 matches
Mail list logo