style: Normalize variable expansions to ${var} across the repo
Replace bare $var with ${var} everywhere it was still used, matching
the convention already established in rc.d/prompt and rc.d/history.
Positional parameters ($1, $@, $#) and special variables ($?, $$, $-)
are left as-is, consistent with existing usage in _helpers.bash.
rc.d/broot is auto-generated by the broot binary and will likely be
overwritten with its original formatting on the next broot update.
This commit is contained in:
+8
-8
@@ -1,20 +1,20 @@
|
||||
todo() {
|
||||
if [[ ! -f $HOME/.todo ]]; then
|
||||
touch $HOME/.todo
|
||||
if [[ ! -f "${HOME}/.todo" ]]; then
|
||||
touch "${HOME}/.todo"
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
cat $HOME/.todo
|
||||
cat "${HOME}/.todo"
|
||||
elif [[ "$1" == "-l" ]]; then
|
||||
cat -n $HOME/.todo
|
||||
cat -n "${HOME}/.todo"
|
||||
elif [[ "$1" == "-c" ]]; then
|
||||
echo "" > $HOME/.todo
|
||||
echo "" > "${HOME}/.todo"
|
||||
elif [[ "$1" == "-r" ]]; then
|
||||
cat -n $HOME/.todo
|
||||
cat -n "${HOME}/.todo"
|
||||
echo -ne "----------------------------\nType a number to remove: "
|
||||
read NUMBER
|
||||
sed -ie ${NUMBER}d $HOME/.todo
|
||||
sed -ie "${NUMBER}d" "${HOME}/.todo"
|
||||
else
|
||||
echo "$@" >> $HOME/.todo
|
||||
echo "$@" >> "${HOME}/.todo"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user