diff --git a/.zshrc b/.zshrc index c6dcd8f..a383cfe 100644 --- a/.zshrc +++ b/.zshrc @@ -232,14 +232,15 @@ fi } + # TODO: encode the url to fix things like spaces using something like https://stackoverflow.com/a/10660730/11162605 + # usage: sitepath + # usage: sitepath + # usage: sitepath + # usage: sitepath -- you can search with 'fd' if you put in a command sitepath() { - # usage: sitepath - # usage: sitepath - # usage: sitepath - - # If there is no input, make the input be the current directory + # If there is no input, make the input the current directory [ -z ${1+x} ] && 1="$(pwd)" - FILEPATH="$(([ -e "$1" ] && readlink -f "$1") || fd "$1" /home/blake/docker/blakenorth.net/site)" + FILEPATH="$(([ -e "$1" ] && readlink -f "$1") || fd $@ /home/blake/docker/blakenorth.net/site)" echo "$FILEPATH" | grep -o 'site.*' | sed 's+^site+https://blakenorth.net+g' }