mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-18 01:29:06 +00:00
man page for home
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
man/
|
||||
@@ -16,4 +16,5 @@ alias dt="cd $HOME/Desktop"
|
||||
alias dl="cd $HOME/Downloads"
|
||||
alias serve="python3 -m http.server ${PORT:-3001}"
|
||||
alias python="PYTHONPATH=$(pwd):$PYTHONPATH python"
|
||||
alias -g G='| grep'
|
||||
alias -g G='| grep -i'
|
||||
mansect () { man -aWS ${1?man section not provided} \* | xargs basename | sed 's/\.[^.]*$//' | sort -u; }
|
||||
|
||||
@@ -9,3 +9,4 @@ export PATH="$PATH:$HOME/Library/Python/3.9/bin"
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
export MANPATH="$HOME/.dotfiles/man:$MANPATH"
|
||||
|
||||
14
home.sh
14
home.sh
@@ -44,6 +44,16 @@ __home_do_relink () {
|
||||
echo "$(pwd)/.dotfiles/synced/iTerm Default Dynamic Profile.app"
|
||||
echo "If it already exists in your startup items, you can ignore this info."
|
||||
echo
|
||||
|
||||
man_out_dir="./man/man7"
|
||||
man_file="home.7"
|
||||
man_srcdir="./man_src"
|
||||
if [[ ! -f "$man_out_dir/$man_file.gz" ]]; then
|
||||
echo_cyan "Copying MAN page..."
|
||||
mkdir -p $man_out_dir
|
||||
cp $man_srcdir/$man_file $man_out_dir/$man_file
|
||||
gzip $man_out_dir/$man_file
|
||||
fi
|
||||
|
||||
# END
|
||||
|
||||
@@ -65,6 +75,10 @@ __home_print_help () {
|
||||
__home_print_help_arg "relink" "Re-link all settings files to their appropriate locations (e.g. iTerm profiles file)"
|
||||
}
|
||||
|
||||
rhome () {
|
||||
home refresh && home $@
|
||||
}
|
||||
|
||||
home() {
|
||||
if [[ $# -eq 0 ]]; then
|
||||
__home_print_help
|
||||
|
||||
31
man_src/home.7
Normal file
31
man_src/home.7
Normal file
@@ -0,0 +1,31 @@
|
||||
.\" Manpage for home.
|
||||
.\" Contact vivek@nixcraft.net.in to correct errors or typos.
|
||||
.TH man 7 "31 Jan 2021" "1.0" "home man page"
|
||||
.SH NAME
|
||||
home \- dotfiles manager
|
||||
.SH SYNOPSIS
|
||||
home [COMMAND]
|
||||
.SH DESCRIPTION
|
||||
home is a command for managing dotfiles across the system.
|
||||
.SH OPTIONS
|
||||
home takes one command:
|
||||
|
||||
push Push updates to git
|
||||
|
||||
pull Pull updates from
|
||||
|
||||
reload Reload (source) the current shell
|
||||
|
||||
refresh Refresh (source) only the home script
|
||||
|
||||
relink Re\-link all settings files to their appropriate locations (e.g. iTerm profiles file)
|
||||
|
||||
help
|
||||
-h Dislpay help file
|
||||
|
||||
.SH SEE ALSO
|
||||
git(1)
|
||||
.SH BUGS
|
||||
No known bugs.
|
||||
.SH AUTHOR
|
||||
Chen Asraf (contact@casraf.com)
|
||||
Reference in New Issue
Block a user