{"action":"created","issue":{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1552","labels_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1552/labels{/name}","comments_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1552/comments","events_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1552/events","html_url":"https://github.com/KSP-CKAN/CKAN/issues/1552","id":123900067,"number":1552,"title":"find_regexp with find_matches_files true should allow installation of multiple files","user":{"login":"politas","id":2109967,"avatar_url":"https://avatars.githubusercontent.com/u/2109967?v=3","gravatar_id":"","url":"https://api.github.com/users/politas","html_url":"https://github.com/politas","followers_url":"https://api.github.com/users/politas/followers","following_url":"https://api.github.com/users/politas/following{/other_user}","gists_url":"https://api.github.com/users/politas/gists{/gist_id}","starred_url":"https://api.github.com/users/politas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/politas/subscriptions","organizations_url":"https://api.github.com/users/politas/orgs","repos_url":"https://api.github.com/users/politas/repos","events_url":"https://api.github.com/users/politas/events{/privacy}","received_events_url":"https://api.github.com/users/politas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-25T22:48:33Z","updated_at":"2015-12-26T00:56:38Z","closed_at":null,"body":"As noted in KSP-CKAN/NetKAN#2863, a find_regexp directive with find_matches_files set to true only matches and installs one file, even if there are several that match the pattern. (It also doesn't seem to match either the first or last file alphabetically) If it matched and installed all files that match the regexp pattern, we could do things like install a set of example craft files into the Ships/SPH folder based on wildcard matching. \r\n\r\nAlso, strangely, when attempting to match a set of files like this:\r\n/KAX/Example Craft/KAX Bungalow.craft\r\n/KAX/Example Craft/KAX Choppah.craft\r\n/KAX/Example Craft/KAX ESpirit.craft\r\n/KAX/Example Craft/KAX Horizon.craft\r\n/KAX/Example Craft/KAX Predator.craft\r\n/KAX/Example Craft/KAX Sparrow.craft\r\n\r\nThis is the results I got with different strings:\r\n\r\n\"find_regexp\" : \"Example.Craft.*craft\"\r\n\"find_matches_files\" : true\r\n\"install_to\" : \"Ships/SPH\"\r\n\r\ninstalled KAX Choppah.craft into Ships/SPH\r\n\r\n\"find_regexp\" : \"KAX.*craft\"\r\n\"find_matches_files\" : true\r\n\"install_to\" : \"Ships/SPH\"\r\n\r\ntried to install KAX Choppah.craft into Ships/SPH/Example Craft/ (which failed due to non-existent directory)\r\n\r\nIt's not clear why it tries to use the directory name in the second example but not the first. Nor is it clear why it ignored the /KAX directory level in both."},"comment":{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/comments/167268932","html_url":"https://github.com/KSP-CKAN/CKAN/issues/1552#issuecomment-167268932","issue_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/1552","id":167268932,"user":{"login":"plague006","id":10162554,"avatar_url":"https://avatars.githubusercontent.com/u/10162554?v=3","gravatar_id":"","url":"https://api.github.com/users/plague006","html_url":"https://github.com/plague006","followers_url":"https://api.github.com/users/plague006/followers","following_url":"https://api.github.com/users/plague006/following{/other_user}","gists_url":"https://api.github.com/users/plague006/gists{/gist_id}","starred_url":"https://api.github.com/users/plague006/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plague006/subscriptions","organizations_url":"https://api.github.com/users/plague006/orgs","repos_url":"https://api.github.com/users/plague006/repos","events_url":"https://api.github.com/users/plague006/events{/privacy}","received_events_url":"https://api.github.com/users/plague006/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T00:56:38Z","updated_at":"2015-12-26T00:56:38Z","body":":-1: for changing the way existing functions act.\r\n\r\nIf you want to propose an entirely new function that allows selecting multiple files that's a whole other story. In that case I would much prefer to see an `install_as` function as @dbent has mentioned (basically select a folder and install it under a different name, so that we can `find: Example Craft` and `install_as: SPH`."}}