view scripts/startup/version-rcfile @ 20514:ac0f7acdc3fd

avoid executing startup file twice when using run-octave script (bug #45872) * site-rcfile: Rename from local-rcfile. * version-rcfile: Rename from main-rcfile. * scripts/startup/module.mk: Update to match new names. (install-startup-files, uninstall-startup-files): Move rules here from scripts/module.mk. * site-rcfile, version-rcfile: Note environment variables that may be used to select site and version rcfiles to execute. * run-octave.in (OCTAVE_VERSION_INITFILE): Define to use version-rcfile from source tree. (OCTAVE_SITE_INITFILE): Update to use site-rcfile from source tree.
author John W. Eaton <jwe@octave.org>
date Fri, 04 Sep 2015 12:45:46 -0400
parents scripts/startup/main-rcfile@501cb6a90f0f
children
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 should contain any 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"));

if (strcmp (PAGER (), "less") && isempty (getenv ("LESS")))
  PAGER_FLAGS ('-e -X -P"-- less ?pB(%pB\\%):--. (f)orward, (b)ack, (q)uit$"');
endif

## This appears here instead of in the pkg/PKG_ADD file so that --norc
## will also skip automatic loading of packages.

pkg ("load", "auto");

atexit ("__finish__");