Changeset 8135737
- Timestamp:
- Jan 23, 2012, 5:12:56 PM (13 years ago)
- Branches:
- master, release-1.10, release-1.9
- Children:
- 9a2dd0c, ab88b05, 533b3a4
- Parents:
- 678f607
- git-author:
- Kevin Riggle <kevinr@free-dissociation.com> (12/26/11 17:35:51)
- git-committer:
- David Benjamin <davidben@mit.edu> (01/23/12 17:12:56)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/barnowl.1
rbad4496 r8135737 35 35 .TP 36 36 \fB\-c\fP, \fB\-\-config\-file\fP=\fIFILE\fP 37 Specify an alternate config file for \fBBarnOwl\fP to use. By default, 38 \fBBarnOwl\fP uses \fI~/.barnowlconf\fP if it exists, and \fI~/.owlconf\fP otherwise. 37 Specify an alternate config file for \fBBarnOwl\fP to use. The config file is 38 an arbitrary Perl script evaluated in the \fImain\fP package, and if it 39 overrides the \fIBarnOwl::startup\fP method that is run when \fBBarnOwl\fP 40 starts. (Compare \fI~/.owl/startup\fP, which contains \fBBarnOwl\fP commands 41 that are run at startup after the config file is loaded.) 42 43 By default, \fBBarnOwl\fP uses the first of \fI~/.owl/init.pl\fP, 44 \fI~/.barnowlconf\fP, or \fI~/.owlconf\fP that exists. 39 45 40 46 .TP -
owl.c
r389d487 r8135737 41 41 fprintf(stderr, " -v,--version print the Barnowl version number and exit\n"); 42 42 fprintf(stderr, " -h,--help print this help message\n"); 43 fprintf(stderr, " -c,--config-file specify an alternate config file\n");44 43 fprintf(stderr, " -s,--config-dir specify an alternate config dir (default ~/.owl)\n"); 44 fprintf(stderr, " -c,--config-file specify an alternate config file (default ~/.owl/init.pl)\n"); 45 45 fprintf(stderr, " -t,--tty set the tty name\n"); 46 46 } -
perl/lib/BarnOwl.pm
r7803326 r8135737 329 329 our @all_commands; 330 330 331 if(!$configfile && -f $ENV{HOME} . "/.barnowlconf") { 332 $configfile = $ENV{HOME} . "/.barnowlconf"; 333 } 334 $configfile ||= $ENV{HOME}."/.owlconf"; 331 if(!$configfile) { 332 if (-f get_config_dir() . "/init.pl") { 333 $configfile = get_config_dir() . "/init.pl"; 334 } elsif (-f $ENV{HOME} . "/.barnowlconf") { 335 $configfile = $ENV{HOME} . "/.barnowlconf"; 336 } else { 337 $configfile = $ENV{HOME}."/.owlconf"; 338 } 339 } 335 340 336 341 # populate global variable space for legacy owlconf files
Note: See TracChangeset
for help on using the changeset viewer.