Lines Matching defs:path
61 " [-S socket-path] [-T features] [command [flags]]\n",
113 expand_path(const char *path, const char *home)
119 if (strncmp(path, "~/", 2) == 0) {
122 xasprintf(&expanded, "%s%s", home, path + 1);
126 if (*path == '$') {
127 end = strchr(path, '/');
129 name = xstrdup(path + 1);
131 name = xstrndup(path + 1, end - path - 1);
142 return (xstrdup(path));
150 char *path;
160 log_debug("%s: invalid path: %s", __func__, next);
170 path = expanded;
172 path = xstrdup(resolved);
176 if (strcmp(path, (*paths)[i]) == 0)
180 log_debug("%s: duplicate path: %s", __func__, path);
181 free(path);
185 (*paths)[(*n)++] = path;
193 char **paths, *path, *base;
205 xasprintf(cause, "no suitable socket path");
208 path = paths[0]; /* can only have one socket! */
213 xasprintf(&base, "%s/tmux-%ld", path, (long)uid);
214 free(path);
233 xasprintf(&path, "%s/%s", base, label);
235 return (path);
362 char *path = NULL, *label = NULL;
437 free(path);
438 path = xstrdup(optarg);
526 if (path == NULL && label == NULL) {
529 path = xstrdup(s);
530 path[strcspn(path, ",")] = '\0';
533 if (path == NULL) {
534 if ((path = make_label(label, &cause)) == NULL) {
543 socket_path = path;