Evan Gates  committed 5144515

make the prompt for each window the name of the channel/user

  • Participants
  • Parent commits 1bced3b

Comments (0)

Files changed (1)

 void win(int wd)
-	char out[PATH_MAX], in[PATH_MAX];
-	char *wincmd[] = {term, "-title", paths[wd], "-e", "srw", "cw", "-f", out, in, NULL};
+	char out[PATH_MAX], in[PATH_MAX], path[PATH_MAX], prompt[32];
+	char *wincmd[] = {term, "-title", paths[wd], "-e", "srw", "-p", prompt, "cw", "-f", out, in, NULL};
 	if (wins[wd])
+	strcpy(path, paths[wd]);
+	sprintf(prompt, "%s> ", basename(path));
 	sprintf(out, "%s/out", paths[wd]);
 	sprintf(in,  "%s/in",  paths[wd]);