{"action":"opened","issue":{"url":"https://api.github.com/repos/brockgr/csshx/issues/36","labels_url":"https://api.github.com/repos/brockgr/csshx/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/brockgr/csshx/issues/36/comments","events_url":"https://api.github.com/repos/brockgr/csshx/issues/36/events","html_url":"https://github.com/brockgr/csshx/issues/36","id":59720220,"number":36,"title":"Files specified with extra_cluster_file not loaded properly","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brockgr/csshx/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/brockgr/csshx/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/brockgr/csshx/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-03T22:48:56Z","updated_at":"2015-03-03T22:48:56Z","closed_at":"2015-03-03T22:48:56Z","body":"```\nWhat steps will reproduce the problem?\n1. Within .csshrc add a line specifying an extra cluster file, eg \n\"extra_cluster_file=~/.csshclusters\"\n2. Create ~/.csshclusters file containing the line \"testcluster hostname1 \nhostname2 hostname3\"\n3. Give the command \"csshX testcluster\"\n\nWhat is the expected output? What do you see instead?\n\nI would expect terminal windows to be opened on machines hostname1, hostname2 \nand hostname3. Instead an attempt is made to open the windows, which then \nclose. Adding the \"-d\" debug option reveals csshX is trying to connect to a \nhost named testcluster instead of expanding it into a list of host names.\n\nWhat version of csshX (do a \"csshX -v\") are you using? On what operating\nsystem version?\n\nVersion csshX v0.73-169 (installed from MacPorts)\nRunning on OS X 10.6.5\n\nPlease provide any additional information below.\n\nThe problem lies in the \"map\" function call on lines 140 through 142 that reads \nthe extra cluster file names from the \"extra_cluster_file\" directive, \nsubstituting the home directory as needed. Currently these lines read\n\n                $obj->load_clusters($_) foreach (\n                    map { s/(~|\\$HOME)/$ENV{HOME}/g} split /\\s*,\\s*/, $value\n                );\n\nThe content of the \"map{ ... }\" call is incorrect as the \"s\" substitute command \nreturns the number of substitutions made. Thus the result of the \"map\" is \ntypically the integer value 0 or 1 (depending on if a substitution needed to be \nmade).\n\nIn turn this results in the load_clusters() function trying to load the \nadditional cluster configurations from a file named \"1\" in the current \ndirectory.\n\nThe fix is simply to return \"$_\" as the value of the \"map\" call, after the \nsubstitutions...\n\n                $obj->load_clusters($_) foreach (\n                    map { s/(~|\\$HOME)/$ENV{HOME}/g; $_ } split /\\s*,\\s*/, $value\n                );\n\nCheers...\n```\n\nOriginal issue reported on code.google.com by `TruthSee...@gmail.com` on 8 Dec 2010 at 11:07"}}