~yerinalexey/dotfiles

717c92b9b58c4dab70d3ed4d3c4ada9ccb363395 — Alexey Yerin 8 months ago ff7a1f3
Move Zig documentation offline
3 files changed, 15 insertions(+), 3 deletions(-)

M qutebrowser/quickmarks
A zsh/functions.zsh
M zsh/init.zsh
M qutebrowser/quickmarks => qutebrowser/quickmarks +0 -3
@@ 6,6 6,3 @@ docsrs https://docs.rs

gostd https://godocs.io/-/go
godocs https://godocs.io

zigdoc https://ziglang.org/documentation/0.7.1
zigstd https://ziglang.org/documentation/0.7.1/std

A zsh/functions.zsh => zsh/functions.zsh +14 -0
@@ 0,0 1,14 @@
# Random useful functions

# Open Zig documentation
function zd() {
	[ ! -f "$XDG_DATA_HOME/zig.html" ] && \
		curl -sS "https://ziglang.org/documentation/0.7.1" -o "$XDG_DATA_HOME/zig.html"

	"$BROWSER" "$XDG_DATA_HOME/zig.html" 2>/dev/null >/dev/null
}

# Open Zig stdlib
function zs() {
	cd /usr/lib/zig/std
}

M zsh/init.zsh => zsh/init.zsh +1 -0
@@ 30,4 30,5 @@ ZSHRC="$XDG_CONFIG_HOME/zsh"
source "$ZSHRC/aliases.zsh"
source "$ZSHRC/bindings.zsh"
source "$ZSHRC/history.zsh"
source "$ZSHRC/functions.zsh"
source "$ZSHRC/plugins.zsh"