3 ms·
For local documentation of libraries (and languages): #! /bin/bash remote_file_path=$1 wget --recursive --level=5 --convert-links --page-requisit
by falcolas 4y ago
For local documentation of libraries (and languages):
#! /bin/bash
remote_file_path=$1
wget --recursive --level=5 --convert-links --page-requisites --wait=1 --random-wait --timestamping --no-parent ${remote_file_path}
And a couple of zshrc functions which make jumping around my filesystem quite snappy. `jump` is aliased to `j`, and `mark` to `m`
MARKPATH=~/.marks
function jump {
cd -P ${MARKPATH}/$1 2> /dev/null || (echo "No such mark: $1" && marks)
}
function mark {
mkdir -p ${MARKPATH}; ln -s $(pwd) $MARKPATH/$1
}
function unmark {
rm -i ${MARKPATH}/$1
}
function marks {
ls -l ${MARKPATH} | sed 's/ / /g' | cut -d' ' -f9- && echo
}
_jump()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$( ls $MARKPATH )" -- $cur) )
}
complete -F _jump jump
(Totally stolen, and fixed up to work in ZSH)
- blueblob 4y agoI also stole jump script, but instead of aliasing, I just renamed the function to j instead of jump. I still kept mark as is because I don't use it anywhere near as often as j.
- firesloth 4y agoI did something similar in bash using cd instead of jump. export CDPATH=.:~/.marks/ function mark { ln -sv "$(pwd)" ~/.marks/"$1" } I prefix all the "marks" with a symbol (eg "@") then if I do $ cd @ then press tab it will list all the marks, or autocomplete if I type more.