Fish - The friendly interactive shell
Posted May 19, 2005 20:59 UTC (Thu) by liljencrantz
In reply to: Fish - The friendly interactive shell
Parent article: Fish - The friendly interactive shell
I dont think supporting $'string' is a good idea, you can just use 'printf "%b" $string'. Don't build things into the shell if they can be performed just as well in an external command. Calling external commands is what shells are all about!
I will split the completions into separate files eventually. But since this ~1500 line file loads nearly instantly even on my old Pentim 2 300 MHz, this is not on the top of my priority list. (The history file takes about a quarter of a second to load 1000 entries, though. That has to improve.)
My gripe with zsh wildcard completion is that I dont want it to change the text before the cursor. Imagine that I want to remove all the backups of txt files in a directory. In fish I cound type 'rm *.t<TAB>' and it would be expanded to 'rm *.txt', after which I could add a '~' to make the commandline 'rm *.txt~', which is what I wanted. In zsh this won't work.
As to crippled configurations, I don't know. I base my experience on the default zsh package on Fedora Core 3 and on a custom build of zsh on Solaris at my old University. Both have underwhelming default settings. If they are crippled, either intentionally or by mistake, I dont know.
And as to further bloating fish - you're right. I don't want to bloat it. But on the other hand I've tried to make it possible to hack fish without bloating the shell itself. Examples of a few hacks that I've included in the default version of fish:
Press Meta-L to list the current directory. But if the cursor is over a string that is a file or directory, the contents of that directory is printed.
The vared function is used to edit a variable value. The vared function has a history, separate from the main command buffer, and includes quote and parenthesis highlighting X clipboard copy and paste, etc..
Ctrl-R does a regexp replace on the current commandline. Or if the current commandline is empty, the first entry of the command history is used.
These are all implemented as simple keybindings and/or fish functions, without bloating the shell with builtins.
to post comments)