aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-07-14 06:42:06 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-07-14 06:42:06 +0000
commitd358a352c0d29f66c62f52f1f4426d6f90832abd (patch)
tree567ffdc2a976e01c2088fa785b1a5fb9982dca86 /tmux.h
parente63567d51ce76e45013b4a392eba1443fd5b3493 (diff)
downloadrtmux-d358a352c0d29f66c62f52f1f4426d6f90832abd.tar.gz
rtmux-d358a352c0d29f66c62f52f1f4426d6f90832abd.tar.bz2
rtmux-d358a352c0d29f66c62f52f1f4426d6f90832abd.zip
Tidy up and improve target (-t) argument parsing:
- move the code back into cmd.c and merge with the existing functions where possible; - accept "-tttyp0" as well as "-t/dev/ttyp0" for clients; - when looking up session names, try an exact match first, and if that fails look for it as an fnmatch pattern and then as the start of a name - if more that one session matches an error is given; so if there is one session called "mysession", -tmysession, -tmysess, -tmysess* are equivalent but if there is also "mysession2", the last two are errors; - similarly for windows, if the argument is not a valid index or exact window name match, try it against the window names as an fnmatch pattern and a prefix.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/tmux.h b/tmux.h
index 551f876b..4f037143 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.359 2009-07-14 06:40:33 nicm Exp $ */
+/* $Id: tmux.h,v 1.360 2009-07-14 06:42:06 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1075,11 +1075,6 @@ int paste_replace(struct paste_stack *, u_int, char *);
/* clock.c */
void clock_draw(struct screen_write_ctx *, u_int, int);
-/* arg.c */
-struct client *arg_parse_client(const char *);
-struct session *arg_parse_session(const char *);
-int arg_parse_window(const char *, struct session **, int *);
-
/* cmd.c */
struct cmd *cmd_parse(int, char **, char **);
int cmd_exec(struct cmd *, struct cmd_ctx *);
@@ -1093,7 +1088,9 @@ struct session *cmd_current_session(struct cmd_ctx *);
struct client *cmd_find_client(struct cmd_ctx *, const char *);
struct session *cmd_find_session(struct cmd_ctx *, const char *);
struct winlink *cmd_find_window(
- struct cmd_ctx *, const char *, struct session **);
+ struct cmd_ctx *, const char *, struct session **);
+int cmd_find_index(
+ struct cmd_ctx *, const char *, struct session **);
extern const struct cmd_entry *cmd_table[];
extern const struct cmd_entry cmd_attach_session_entry;
extern const struct cmd_entry cmd_bind_key_entry;