From 667a006f81d05acf812910085cb8f55a4ee8c512 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 18 Jan 2024 12:43:16 -0800 Subject: Change naming of functions to dot notation. --- cdlog.sh | 16 ++++++++-------- 1 file 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 -- cgit v1.2.3