aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2016-07-21 23:25:19 -0400
committerTeddy Wing2016-07-21 23:25:19 -0400
commit80504f6387f9bb2e831588e7ce933ef6f78383dd (patch)
tree7294b4a38bf31c48cd2c3cf53173c5bfb359c688
parent30fcb9ed86d95be7c33f527f04e167682728627a (diff)
downloadqcd-80504f6387f9bb2e831588e7ce933ef6f78383dd.tar.bz2
qcd: Add descriptive comment to `change_shortcut`
Add a comment describing what those seemingly random slashes are for.
-rwxr-xr-xqcd2
1 files changed, 2 insertions, 0 deletions
diff --git a/qcd b/qcd
index 0afce74..c4508e5 100755
--- a/qcd
+++ b/qcd
@@ -52,6 +52,8 @@ function change_shortcut () {
if shortcut_exists $shortcut; then
path=$(absolute_path "$path")
+
+ # The `//\//\/` escapes slashes in the path so that `sed` doesn't complain
sed -i.bak -E "s/^${shortcut} .+$/${shortcut} ${path//\//\/}/" $QCD_DATABASE_FILE
fi
}