config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 6b5b3d59967121e9f0942292a3630305aa5da236
parent b780435769778fe9986a9ebd2876f452d160ddc3
Author: jacob@nzxt <jacobouno@protonmail.com>
Date:   Mon,  9 Mar 2020 13:06:43 -0700

aliases: fixed wd() not replacing the right stuff

more specificly, on BSD /usr, and this should work for any costom directory

Diffstat:
Maliases/.aliases | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/aliases/.aliases b/aliases/.aliases @@ -63,7 +63,10 @@ ds(){ curl "dict://dict.org/m:$1" ;} d(){ curl "dict://dict.org/d:$1" ;} # get working directory -wd() { pwd | sed "s/\/home\/$USER/~/g" ;} +wd(){ + local home="$( printf $HOME | sed "s/\//\\/g" )" + pwd | sed "s/$home/~/g" +} # start tmux automaticly ssh(){ /usr/bin/ssh -t "$@" "tmux a || tmux new" ;}