> I also like your suggestion of supporting "$(…)", especially because > this is currently a syntax error, so there's no compatibility risk. > There's some synergy between this and string manipulation. There could > be a built-in "str" or "munge" or whatever that manipulates its argument > based on other parameters, e.g. "(munge --strip '/*' --repeat $PWD)" to > get the last component of pwd. I had one common 'crazy' idea. Though I think it will not be supported by most of people I want at least to tell about it. Some required capabilities (like string manipulation, math and others) can be implemented by embedding some scripting language in fish. It may sound a bit strange to use one scripting language to support another one, but there are advantages of such an approach. While keeping fish syntax for interactive usage and basic scripting, the other scripting syntax will be efficient to solve tasks where fish syntax is not so useful.
Writing this I keep in mind an example of 'lua' language. Which is created as tiny and fast embeddable language. Lua is not the only option, but since I know only it as candidate, I will write about advantages of using lua. 1) Lua (www.lua.org) is embeddable language with small memory footprint, clean and consistent syntax. It is executed by a virtual machine, which performance is comparable to python (http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=lua&lang2=python3). O by a very fast JIT compiler (http://luajit.org/performance_x86.html). 2) Out of the box it supports lua regular expressions. It's like a limited version of common regular expressions, but made with efficiency in mind. String manipulation, string matching. 3) The Perl regular expressions can be also included as a module. 4) Math functions with ability to add own functions. 5) Embedding lua (or some other scripting language) allows to introduce extendedable functions for string manipulation, math, condition testing. It allows to add new 'builtins' without hardcoding them and recompiling fish. The scripting will be also useful for writing completions or functions for keybinding without calling external programs. That's it. I'm not sure it's actually should be added to fish, but I see that there are a lot of benefits on this way. regards, Maxim ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users