Mercurial > octave
view scripts/startup/version-rcfile @ 22617:51b7d8456ce3 stable
Ensure user inputrc file overrides Octave's default inputrc (bug #49323).
* scripts/startup/version-rcfile: After reading Octave's default inputrc,
read in user's INPUTRC.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 12 Oct 2016 18:22:41 -0700 |
parents | cf227735d5fd |
children | e9a0469dedd9 |
line wrap: on
line source
## System-wide startup file for Octave. ## ## If the environment variable OCTAVE_VERSION_INITFILE is set when Octave ## starts, then that file is executed instead of this file. ## ## This file contains commands that should be executed each time Octave starts ## for every user at this site. ## Configure readline using the file inputrc in the Octave startup directory. readline_read_init_file (sprintf ("%s%s%s", __octave_config_info__ ("startupfiledir"), filesep, "inputrc")); ## Re-read user's personal inputrc to give precedence over Octave's default. inputrc = getenv ("INPUTRC"); if (isempty (inputrc) && exist ("~/.inputrc", "file")) inputrc = "~/.inputrc"; endif if (! isempty (inputrc)) readline_read_init_file (inputrc); endif clear ("inputrc"); ## Configure LESS pager if present if (strcmp (PAGER (), "less") && isempty (getenv ("LESS"))) PAGER_FLAGS ('-e -X -P"-- less ?pB(%pB\\%):--. (f)orward, (b)ack, (q)uit$"'); endif ## For Matlab compatibility, run startup.m when starting Octave. if (exist ("startup", "file")) startup; # No arg list here since startup might be a script. endif ## For Matlab compatibility, schedule finish.m to run when exiting Octave. atexit ("__finish__");