{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/436","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/436/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/436/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/436/events","html_url":"https://github.com/fish-shell/fish-shell/issues/436","id":9167084,"number":436,"title":"fish has no true array (arrays are strings delimited by \\x1e)","user":{"login":"xiaq","id":582021,"avatar_url":"https://avatars.githubusercontent.com/u/582021?v=3","gravatar_id":"","url":"https://api.github.com/users/xiaq","html_url":"https://github.com/xiaq","followers_url":"https://api.github.com/users/xiaq/followers","following_url":"https://api.github.com/users/xiaq/following{/other_user}","gists_url":"https://api.github.com/users/xiaq/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaq/subscriptions","organizations_url":"https://api.github.com/users/xiaq/orgs","repos_url":"https://api.github.com/users/xiaq/repos","events_url":"https://api.github.com/users/xiaq/events{/privacy}","received_events_url":"https://api.github.com/users/xiaq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4","html_url":"https://github.com/fish-shell/fish-shell/milestones/fish-future","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4/labels","id":130257,"number":4,"title":"fish-future","description":"These are bugs that are not targeted for an upcoming release. After a release, we will reexamine these bugs and pull any in that we think are good targets.\r\n\r\nIf you can provide a fix for a bug in this milestone, we'll generally accept it for the next release even if the bug is not in the release.","creator":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"open_issues":392,"closed_issues":103,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2015-11-27T17:00:15Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2012-12-11T02:32:24Z","updated_at":"2015-11-27T17:29:04Z","closed_at":null,"body":"In `expand.h`:\r\n\r\n```c\r\n/** Character for separating two array elements. We use 30, i.e. the ascii record separator since that seems logical. */\r\n#define ARRAY_SEP 0x1e\r\n\r\n/** String containing the character for separating two array elements */\r\n#define ARRAY_SEP_STR L\"\\x1e\"\r\n```\r\n\r\nThis results in:\r\n\r\n```fish\r\nxiaq@blackie ~> set a (printf 'a\\x1eb')\r\nxiaq@blackie ~> count $a\r\n2\r\nxiaq@blackie ~> set a (printf 'a\\x1fb')\r\nxiaq@blackie ~> count $a\r\n1\r\n```\r\n\r\nIt's clear that the char \\x1e is treated specially as element delimiter."},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/160179965","html_url":"https://github.com/fish-shell/fish-shell/issues/436#issuecomment-160179965","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/436","id":160179965,"user":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T17:29:04Z","updated_at":"2015-11-27T17:29:04Z","body":"@faho I think that idea has merit. The worst part of the old scheme was implicitly splitting on colons, which would mangle variables that should not be split. In your idea this is (almost) always explicit so I think it's quite safe.\r\n\r\nRegarding escaping, not escaping colon in PATH is intentional per the link you found. I doubt PYTHONPATH, CLASSPATH, etc. are any more consistent in this regard. Since you can't use a colon in these paths, we can choose whether or not we escape it; but if we escape a colon we need to escape backslashes, and I'll bet you can have a backslash in PATH. We may need a \"don't escape\" whitelist (ugh).\r\n\r\nAlternatively we don't worry about it, and just let any colon act as delimiters. I think I lean towards this for simplicity and familiarity with other shells.\r\n\r\nWe still are faced with the problem that some list-like variables are space-delimited, and others are colon delimited. One possibility is that `splitenv` accepts a delimiter, remembers it, and uses it to rebuild the value on export:\r\n\r\n    splitenv --on ' ' LESS\r\n    splitenv --on ':' PYTHONPATH\r\n\r\nThese calls now play the dual roles of importing any existing variable, and marking how it gets exported.  What do you think?"}}