aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-01-18 12:43:16 -0800
committerKaz Kylheku <kaz@kylheku.com>2024-01-18 12:43:16 -0800
commit667a006f81d05acf812910085cb8f55a4ee8c512 (patch)
treef21506f840e73380dd154a08c5af9054b7397f82
parent867f00998c07d6917077d5c1b41527fe267d3e5b (diff)
downloadcdlog-667a006f81d05acf812910085cb8f55a4ee8c512.tar.gz
cdlog-667a006f81d05acf812910085cb8f55a4ee8c512.tar.bz2
cdlog-667a006f81d05acf812910085cb8f55a4ee8c512.zip
Change naming of functions to dot notation.
-rw-r--r--cdlog.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/cdlog.sh b/cdlog.sh
index 5e53e4b..403dc04 100644
--- a/cdlog.sh
+++ b/cdlog.sh
@@ -13,7 +13,7 @@ if [ -z "$c1" ] ; then
fi
# One-letter nicknames for most recent four dirs.
-cdlog_nicks()
+cdlog.nicks()
{
x=$c1
y=$c2
@@ -22,7 +22,7 @@ cdlog_nicks()
}
# Change to directory: this is aliased to cd command.
-cdlog_chdir()
+cdlog.chdir()
{
local cur=$PWD
@@ -48,13 +48,13 @@ cdlog_chdir()
c1=$cur
fi
- cdlog_nicks
+ cdlog.nicks
fi
}
# Change to most recent diretory in cdlog and remove it
# from the log.
-cdlog_pop()
+cdlog.pop()
{
if [ -n "$c1" ] && command cd "$c1"; then
c1=$c2
@@ -67,7 +67,7 @@ cdlog_pop()
c8=$c9
c9=
- cdlog_nicks
+ cdlog.nicks
fi
}
@@ -82,9 +82,9 @@ cdlog()
}
# Aliases.
-alias cs='cdlog_chdir "$c1"'
-alias cd='cdlog_chdir -P'
-alias pd='cdlog_pop'
+alias cs='cdlog.chdir "$c1"'
+alias cd='cdlog.chdir -P'
+alias pd='cdlog.pop'
# Better completion for $x[Tab]
shopt -s direxpand