mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-10 21:11:15 -03:00
Autoload : function on startup.
The newly added `:` command is implemented as a function (to avoid increasing complexity by making it a builtin), but it is saved to a path that does not match its filename (since its name is somewhat of a special character that might cause problems during installation). Directly probing the `colon` function for autoload causes `:` to be correctly loaded, so doing just that after function paths are loaded upon startup. This is a hack since the CPP code shouldn't really be aware of individual functions, perhaps there is a better way of doing this.
This commit is contained in:
@@ -384,6 +384,9 @@ int main(int argc, char **argv) {
|
||||
|
||||
const io_chain_t empty_ios;
|
||||
if (read_init(paths)) {
|
||||
// Additional initialization that must occur after paths are loaded
|
||||
misc_init_with_paths();
|
||||
|
||||
// Stomp the exit status of any initialization commands (issue #635).
|
||||
proc_set_last_status(STATUS_CMD_OK);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user