Hello, The current command mechanism doesn't provide a way for a call-back function (cfunc or sfunc) to bind a local state/context to a command. Consequently, it isn't possible to use a single callback function as a generic handler for a number of similar commands. For instance the ``set/show remote ...'' (remote.c) each require an individual wrapper function. By adding a context/state, it becomes possible for a common function to handle all cases. I can think of two ways of implementing this. Using: set_cmd_context() / get_cmd_context() as with this patch; or add a new callback function that takes an additional context parameter vis: set_cmd_ccfunc(cmd, void (*ccfunc) (c, cmd, tty, context), context); The choice, I think is pretty arbitrary and I'm happy to change it to either. Preference? Ok? Andrew