hi, i just stumpled onto the following problem when trying to call an
external program from vi:

in vi i simply selected arange of lines and did:
:'<,'>!sort

'<,'> is the lines to be sorted,
and sort is the command.

the command that vim then actually produces is the following:

fish: Command substitutions not allowedIllegal command name #(sort)#
Standard input: (sort) < /tmp/v744983/1 >/tmp/v744983/2

now this is cearly not a bug in fish, it is arguably one in vim.
and it is surely a difference of expectations, because vim assumed to have a
posix shell here. and this is probably one of the reasons why everyone
insists so much on posix compatibility for shells.

the question for me is: how can fish handle this situation which could
come up in any place where the default shell of the user is used, but is
expected to be posix.

should a bugreport to vim be sent?
might help in the long run, but won't do any good inthe short run.

can the user be educated about the problem?
"this error happened because fish was called from another program which
most like assumed to be a posix shell. you need to fix that program and
tell it not to call fish but a posix shell"
for this, can the calling program be detected by name? ie can fish
figure out that it was called by vim and respond with the right
instructions how to configure vim?
at least a set of instructions for all kinds of programs might need to
be assembled.

should the problem be handled transparently?
ie: take the failing commandline and feed it to /bin/sh and return the result

more ideas?

greetings, martin.
-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   travelling and working in europe             open-steam.org
unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
administrator     (caudium|gotpike).org                          is.schon.org
Martin Bähr       http://www.iaeste.or.at/~mbaehr/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to