1. mpstevens_uk
  2. pcw


Evan Gates  committed 5144515

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

  • Participants
  • Parent commits 1bced3b
  • Branches default

Comments (0)

Files changed (1)

File pcw.c

View file
  • Ignore whitespace
 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]);