Merge branch 'master' of ssh://git.blakenorth.net:6102/home/git/dotfiles
This commit is contained in:
commit
a3e4527e9e
3 changed files with 55 additions and 35 deletions
13
.zshrc
13
.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 <path to file>
|
||||
# usage: sitepath <file to find>
|
||||
# usage: sitepath
|
||||
# usage: sitepath <fd commands> -- you can search with 'fd' if you put in a command
|
||||
sitepath() {
|
||||
# usage: sitepath <path to file>
|
||||
# usage: sitepath <file to find>
|
||||
# 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'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue