From 0b91140ea8195ba1718de350c00ad522f09c5fc4 Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Fri, 6 Dec 2024 00:07:45 +0100 Subject: [PATCH] Output the actual paths in help message Fixes #376. --- yadm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/yadm b/yadm index d347a19..c3dd0e1 100755 --- a/yadm +++ b/yadm @@ -1174,6 +1174,13 @@ function git_command() { } function help() { + readonly config="${YADM_CONFIG/$HOME/\$HOME}" + readonly encrypt="${YADM_ENCRYPT/$HOME/\$HOME}" + readonly bootstrap="${YADM_BOOTSTRAP/$HOME/\$HOME}" + readonly repo="${YADM_REPO/$HOME/\$HOME}" + readonly archive="${YADM_ARCHIVE/$HOME/\$HOME}" + + readonly padding=" " local msg IFS='' read -r -d '' msg << EOF @@ -1201,11 +1208,11 @@ Commands: yadm transcrypt [OPTIONS] - Run transcrypt commands for the yadm repo Files: - \$HOME/.config/yadm/config - yadm's configuration file - \$HOME/.config/yadm/encrypt - List of globs to encrypt/decrypt - \$HOME/.config/yadm/bootstrap - Script run via: yadm bootstrap - \$HOME/.local/share/yadm/repo.git - yadm's Git repository - \$HOME/.local/share/yadm/archive - Encrypted data stored here + $config${padding:${#config}} - yadm's configuration file + $encrypt${padding:${#encrypt}} - List of globs to encrypt/decrypt + $bootstrap${padding:${#bootstrap}} - Script run via: yadm bootstrap + $repo${padding:${#repo}} - yadm's Git repository + $archive${padding:${#archive}} - Encrypted data stored here Use "man yadm" for complete documentation. EOF