On 10/14/07, Chris Rebert <[EMAIL PROTECTED]> wrote: > Fish currently encounters an error when trying to call a process with too > long of a completion list. > Example (I don't use the default fish prompt): > > chris ~ > cat ** #any folder with lots of files/subdirectories will do > fish: Failed to execute process "/bin/cat" > execve: Argument list too long > fish: Backtrace: > -fish [0x8073aed] > > chris ~ > > > I'd like to suggest that rather than erroring when this happens, fish should > do the following: > > chris ~ > cat ** > fish: Number of arguments to command (XXX) exceeds system limit (YYY). > fish: Please try running the command again with fewer arguments. > > Where XXX is the number of arguments the command was given and YYY is the > system limit on the maximum number of command arguments.
When you say 'completions' above, you mean 'arguments', right? Sorry to be a nitpicker, but I might have misunderstood you. If my above assumption is correct, then I agree with you except that it's not entirely easy to get the maximum number of arguments possible. There is an ARG_MAX preprocessor macro, which if defined tells us the sum of the maximum arguments and the maximum number of environment variables. We could print something like: fish: Number of arguments to command (4567) and number of environment variables (63) exceeds the total system limit of 4096. fish: Please try running the command again with fewer arguments. Most (all) current unices also have a maximum size of the data in the argument vector, and as far as I can tell, there is no macro that defines this constant. fish: Size of arguments to command (73 kB) exceeds system limit. fish: Please try running the command again with shorter arguments. It should also be noted that the latest Linux kernel, which was released this month, supports arbitrarily long argument lists, so in the Linux world, this error message will soon be a thing of the past. > > - Chris Rebert Axel ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
