Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Commit e13ca91

Browse files
committed
Rename DEVLOG_HOME env var to DEVLOG_REPO
1 parent d5dc6b8 commit e13ca91

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/guide.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2>install</h2>
3232
<h2>create</h2>
3333
<p>To create a new repository for your devlogs:</p>
3434
<pre>devlog init</pre>
35-
<p>By default, devlogs are stored in the directory at <code>$HOME/devlogs</code>. You can choose a different directory by setting the <code>DEVLOG_HOME</code> environment variable.</p>
35+
<p>By default, devlogs are stored in the directory at <code>$HOME/devlogs</code>. You can choose a different directory by setting the <code>DEVLOG_REPO</code> environment variable.</p>
3636
<p>Examining the repository directory, you'll see a file called <code>000000001.devlog</code>. This is your first devlog entry. It's just a text file.</p>
3737
</section>
3838

@@ -116,8 +116,8 @@ <h3>shell scripts</h3>
116116

117117

118118
<h3>hooks</h3>
119-
<p>Devlog can be extended through a mechanism called "hooks". A <i>hook</i> is an executable file located in the <code>$DEVLOG_HOME/hooks</code> directory. To enable a hook, make the file executable, like this:</p>
120-
<pre>chmod +x $DEVLOG_HOME/hooks/before-edit</pre>
119+
<p>Devlog can be extended through a mechanism called "hooks". A <i>hook</i> is an executable file located in the <code>$DEVLOG_REPO/hooks</code> directory. To enable a hook, make the file executable, like this:</p>
120+
<pre>chmod +x $DEVLOG_REPO/hooks/before-edit</pre>
121121

122122
<p>The following hooks are available:</p>
123123
<table>

src/bin/devlog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::process::exit;
1010
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
1111

1212
const MAIN_INFO: &'static str =
13-
"Devlog files are created in the directory at $DEVLOG_HOME, which defaults to $HOME/devlogs if not set.";
13+
"Devlog files are created in the directory at $DEVLOG_REPO, which defaults to $HOME/devlogs if not set.";
1414

1515
const EDIT_INFO: &'static str =
1616
"Uses the editor program $DEVLOG_EDITOR, which defaults to nano if not set.";

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use dirs;
44
use std::env;
55
use std::path::{Path, PathBuf};
66

7-
const DEVLOG_HOME_ENV_VAR: &'static str = "DEVLOG_HOME";
7+
const DEVLOG_REPO_ENV_VAR: &'static str = "DEVLOG_REPO";
88
const DEFAULT_HOME_DIR: &'static str = "devlogs";
99
const EDITOR_ENV_VAR: &'static str = "DEVLOG_EDITOR";
1010
const DEFAULT_EDITOR: &'static str = "nano";
@@ -27,7 +27,7 @@ impl Config {
2727
/// Load configuration from environment variables,
2828
/// providing defaults if the environment variables are not defined.
2929
pub fn load() -> Config {
30-
let repo_dir_str = env::var(DEVLOG_HOME_ENV_VAR)
30+
let repo_dir_str = env::var(DEVLOG_REPO_ENV_VAR)
3131
.ok()
3232
.unwrap_or_else(default_repo_dir);
3333
let repo_dir = PathBuf::from(repo_dir_str);

0 commit comments

Comments
 (0)