On Fri, Jun 12, 2009 at 20:33, Isaac
Dupree<[email protected]> wrote:
> inherited as an environment variable that contains colons; I expect it
> to be spit out again as an environment variable that contains colons
> which work, not spaces that don't!
makes sense to me, I wonder what uses there are for joining quoted
array vars with spaces. Can anyone enlighten me? or perhaps this could
be changed.
> If there's a secret way to do it anyway (I'd prefer to get colons and
> use the standard external tool 'env', than to use Fish-specific "set
> -lx" style stuff) , I'd appreciate hearing.
What I really like about fish is that it's scriptable and that I can
actually remember the syntax to do so without the manpages (unlike
bash et al):
me ~> function colonjoin
set -l first 1
for x in $argv
if test $first -eq 1
set first 0
else
echo -n :
end
echo -n $x
end
end
me ~> cat ~/temp/strangepath/program
#!/bin/sh
echo Hello Colon World!
me ~> env PATH=~/temp/strangepath:(colonjoin $PATH) bash -c program
Hello Colon World!
me ~>
> but i've just about had it with fish: I love the syntax hilighting and
> history-searching, but it's
> - a few too irritating bugs, for a shell
True, but only one way to get them fixed...
> - needless incompatibility with bash, which makes copy-pasting and
> shell-scripting harder for me
Incompatibility with bash syntax is a necessity to have a cleaner
syntax like fish's. It's inconvenient, but the alternative would be
worse imo.
> (I write bash scripts enough that I know
> all bash's idiosyncrasies better than any other shell/scripting
> language), while fish is not delivering me any of the suggested benefits
> (e.g. I had hoped, if 'begin' 'for' 'function' etc. were deliberately
> made to look like other statements, they would behave somewhat like
> other statements; but actually they're an unstoppable, syntactic, parser
> begin-bracket, a wolf in sheep's clothing. --help doesn't work; they
> affect the interactive parser/command-editor rather than having some
> simple non-creepy generalized way to deliberately enter multi-line
> commands; ...)
>
> Any suggestions for another shell with good syntax-hilighting and/or
> interactive history searching? (bonuses if it doesn't require the
> down-arrow key, because mine is broken :-P)
Nope, though zsh apparently also has some nice features.
> Or will I be frustrated
> enough to write my own Bash-wrapping shell in Haskell? :-) (I guess the
> basic way to do that would involve my process spawning a "bash" process
> whose stdin consisting of command lines is attached to my process... I
> hope there aren't too many gotchas there; I wonder how terminal-seizing
> processes like 'less' work then...)
Browsing through some old fish-users posts I learned that there exist
things like terminal groups and terminal group leaders, and probably
lots more ugly terminal handling related stuff I don't want to know
about, which (I think) all lives in kernel-mode land. I suppose you'll
at least need to make the subshell talk to haskell through a pseudo
tty, like screen does. If you're going to hack away yourself anyway,
you could also consider adapting the fish sources to your needs and
running your own version (and sharing any bugfixes you make while
you're at it).
- Jan
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users