From 80504f6387f9bb2e831588e7ce933ef6f78383dd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 21 Jul 2016 23:25:19 -0400 Subject: qcd: Add descriptive comment to `change_shortcut` Add a comment describing what those seemingly random slashes are for. --- qcd | 2 ++ 1 file changed, 2 insertions(+) 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 } -- cgit v1.2.3