Philip Ganchev wrote: > On Mon, Jun 16, 2008 at 9:01 AM, David Bremner <[EMAIL PROTECTED]> wrote: >> The automatic conversion of environment variables containing ':' into >> arrays seems to be not so great to me. In particular it leads to mystifying >> experiences like the following. > [...] >>From a practical point of view this means that any URLs inherited from >> the environment are mangled. [...] > [...] >> The only alternative that comes to mind is to special case PATH. > > There is no way around special-casing which variables must be > converted from colon-separated to array and which should not. > Currently Fish converts all variables except those it knows it should > not. For example, WWW_HOME and DISPLAY are not converted. Perhaps > it should only convert variables it knows should be converted, like > PATH, LD_LIBRARY_PATH, MANPATH, CLASSPATH, PYTHONPATH, LS_COLORS, > XDG_DATA_DIRS, GTK_RC_FILES, SESSION_MANAGER(?).
we could have an environment variable for that special-casing, that's a colon-separated list of variables that are interpreted as arrays (should it have fish in the name? spelling/capitalization etc?) set FISH_ARRAY_VARS FISH_ARRAY_VARS PATH LD_LIBRARY_PATH ... Then when a user variable is declared as an array and exported (-gx), we can add it to FISH_ARRAY_VARS (-gx)? Is this idea practical? (can fish arrays support values that contain the colon? can you even export them? I forget) >> Not to mention that ':' is AFAIK a valid >> character in a path (my home directory used to be on SFS, which uses ':'). > > I can't make it work in Bash or Tcsh. How is ":" inside a file name > distinguished from a delimiter? simple: it's used in a context that expects a path rather than a delimited list of paths. (It's just impossible to use such a file-path in a standard colon-separated list.) $ touch a:b $ ls a:b $ rm a:b -Isaac ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users