> Ah, and there is always good old "printenv": > env PATH=~/temp/strangepath:(printenv PATH) bash -c "program"
ah, thanks for telling me about printenv, I was wondering if such a command existed! > What I really like about fish is how cleanly it handles arrays: > function colonjoin > printf ':%s' $argv | cut -c 2- > end yes, it's nice that it handles arrays cleanly (except for issues interfacing with the non-Fish world) (I have still never have gotten a good handle on how Bash arrays work!--it always seemed easier to avoid them) > printf is quite useful with fish arrays. > But very frequently I would like to have a "join SEP WORDS" command that > places N-1 separators between N words. And "split SEP STRING" while at that. That's an easy function/command to implement, if anyone has a thought where it should go.. hm.. > Yep, terminal handling w.r.t. job control is the dragon lair of unix :-(. > See http://www.gnu.org/software/libc/manual/html_node/Job-Control.html > for the gory details. What you want to do is extremely hard! > In all history of Unix, I know of only one program to attempt it - > the Midnight Commander - and it didn't work very well. luckily for me, I'm not too interested in job control, and I'm hoping to goodness that if I start from an existing piece of shell code (e.g. Bash or Fish) and only change the parts that send ANSI escape codes and suchlike to the terminal-emulator (or receive typed input), I won't break anything worse than it was already? Does that sound like a necessary and safe approach? > The only sane way to do it is to hack on bash itself, which knows when > it has control of the terminal and when it's running another command. > I'd start by hacking "readline". But even there, getting multi-line editing > is going to be tricky. ...you're thinking that the bash/readline code may be a sounder base than the fish code? or oh wait, I said I wanted it to be a Bash shell, so duh. I might be able to combine Fish's line-editing with Bash's execution engine, if these subsystems are as orthogonal as I hope they are...... I admit that any modifications to actual line-editing are fraught with danger (e.g. Unicode is tricky to implement correctly there), so I've been wondering how to minimize the duplicated effort while still getting some of what I want (e.g. multi line editing would be nice, as you say) > There is http://codespeak.net/pyrepl/ that implemented multi-line editing > in pure Python, whose implementation might give you some ideas. Interesting; do you know if it works well? ------------------------------------------------------------------------------ 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
