commit 6ee76f769771454bbdd56d53c2ce1a7c28ff87a1
parent 84a4c35187b79efe423fa498a7f780eb37ddbaa5
Author: gearsix <gearsix@tuta.io>
Date: Fri, 8 Oct 2021 12:47:07 +0100
updated README
Diffstat:
M | README | | | 55 | ++++++++++++++++++++++++++++++------------------------- |
M | src/dotfm.1 | | | 69 | ++++++++++++++++++++++++++++++++++++++++++++------------------------- |
2 files changed, 74 insertions(+), 50 deletions(-)
diff --git a/README b/README
@@ -12,6 +12,7 @@ DESCRIPTION
ARGUMENTS
-h --help Displays help printout
+ -s --skip Skip prompts where necessary and just use defaults
-d --debug Display debug logs
-v --version Display dotfm version
-q --quiet Tell dotfm to shutup (hide info logs)
@@ -19,48 +20,51 @@ ARGUMENTS
COMMANDS
Multiple DOTFILE args can be passed to each command.
- install <DOTFILE> ...
- create a symlink from DOTFILE to it's install location. DOTFILE
- should be the filepath of the dotfile to install.
+ Some terminology to avoid confusion:
+ - DOTFILE refers to the filepath of the dotfile to be installed
+ - DESTINATION refers to the location you would usually find a
+ dotfile at. For example, the location for bashrc is ~/.bashrc
+ - ALIAS refers to any name used to call a dotfile installed by
+ dotfm. dotfm recognises the source filepath (DOTFILE) as an alias
- If DOTFILE is recognised by dotfm, then a symlink will be created
- at the known install location.
+ install, in <DOTFILE> ...
+ Create a symlink to DOTFILE from it's DESTINATION and register it.
+ DOTFILE should be the filepath of the dotfile to install. If this
+ path matches its DESTINATION, then a symlink won't be created but
+ the file will still be registered by dotfm.
- If DOTFILE is not recognised by dotfm, then you'll be prompted for
- an install location and aliases to reference the dotfile by when
- using dotfm.
+ If DOTFILE is recognised by dotfm, then you will be prompted for
+ an install location and aliases to call the dotfile by. If the
+ --skip option was passed then the defaults will be used.
- update <DOTFILE> <LOCATION>
- update the location that a previously installed dotfile (with an
- alias matching ALIAS) symlink points to (sets it to point to
- LOCATION).
+ update, up <ALIAS> <DOTFILE>
+ update the source DOTFILE path (of the dotfm-registered dotfile
+ matching ALIAS) that DESTINATION points to.
- remove <DOTFILE>...
- Remove the file at the install location of the dotfile with an alias
- matching DOTFILE. This is a destructive function, use it carefully.
+ remove, rm <ALIAS> ...
+ If ALIAS is recognised, then the DESTINATION of the dotfile will be
+ removed. This is a destructive function, use it carefully.
Will only remove the file if the file has been installed by dotfm
(and can be found in DOTFM CSV FILE).
- edit <DOTFILE> ...
+ edit, ed <ALIAS> ...
Open DOTFILE in $EDITOR or nano if $EDITOR is not present.
DOTFILE should be an alias of the dotfile to edit.
- list [<DOTFILE> ...]
+ list, ls <ALIAS> ...
Print a table of the install locations and aliases for all
- dotfiles. If one or more DOTFILE arguments are present, then only
- dotfiles with matching aliases will be listed.
+ registered dotfiles. If one or more DOTFILE arguments are present,
+ then only dotfiles with matching aliases will be listed.
INSTALL
Go to the source folder of dotfm and run "sudo make install" or "sudo
make link".
-
- "sudo make install" - copy dotfm to the install location (recommended
- for most users).
-
- "sudo make link" - create a symlink of dotfm from its current location
- to the install location (useful if you want to modify it frequently).
+ - "sudo make install" - copy dotfm to the install location (recommended
+ for most users).
+ - "sudo make link" - create a symlink of dotfm from its current location
+ to the install location (useful for development).
By default the install location of dotfm is /usr/local/bin/dotfm. To
modify this, just edit the value of DESTBINDIR in the Makefile.
@@ -71,6 +75,7 @@ UNINSTALL
ENVIRONMENT
EDITOR The text editor to edit dotfiles with. If not present,
nano will be used.
+ HOME The home directory of the current user
HINTS
I would recommend modifying the "KNOWN" array in src/ dotfm.py
diff --git a/src/dotfm.1 b/src/dotfm.1
@@ -1,6 +1,5 @@
-.\" txt2man -d "$(date)" -t "dotfm" -s 1 -v "dotfm README" -r "v2.2.0" -s 1 README
.\" Text automatically generated by txt2man
-.TH dotfm 1 "Tue 10 Aug 11:05:27 BST 2021" "v2.2.0" "dotfm README"
+.TH dotfm 1 "Fri 8 Oct 12:46:54 BST 2021" "v2.3.0" "dotfm README"
.SH NAME
\fBdotfm \fP- a simple script to manage dotfiles.
\fB
@@ -25,6 +24,10 @@ everytime you want to modify it).
Displays help printout
.TP
.B
+\fB-s\fP \fB--skip\fP
+Skip prompts where necessary and just use defaults
+.TP
+.B
\fB-d\fP \fB--debug\fP
Display debug logs
.TP
@@ -37,31 +40,41 @@ Display \fBdotfm\fP version
Tell \fBdotfm\fP to shutup (hide info logs)
.SH COMMANDS
Multiple DOTFILE args can be passed to each command.
+.PP
+Some terminology to avoid confusion:
+.RS
+.IP \(bu 3
+DOTFILE refers to the filepath of the dotfile to be installed
+.IP \(bu 3
+DESTINATION refers to the location you would usually find a
+dotfile at. For example, the location for bashrc is ~/.bashrc
+.IP \(bu 3
+ALIAS refers to any name used to call a dotfile installed by
+\fBdotfm\fP. \fBdotfm\fP recognises the source filepath (DOTFILE) as an alias
+.RE
.TP
.B
-install <DOTFILE> \.\.\.
-create a symlink from DOTFILE to it's install location. DOTFILE
-should be the filepath of the dotfile to install.
+install, in <DOTFILE> \.\.\.
+Create a symlink to DOTFILE from it's DESTINATION and register it.
+DOTFILE should be the filepath of the dotfile to install. If this
+path matches its DESTINATION, then a symlink won't be created but
+the file will still be registered by \fBdotfm\fP.
.RS
.PP
-If DOTFILE is recognised by \fBdotfm\fP, then a symlink will be created
-at the known install location.
-.PP
-If DOTFILE is not recognised by \fBdotfm\fP, then you'll be prompted for
-an install location and aliases to reference the dotfile by when
-using \fBdotfm\fP.
+If DOTFILE is recognised by \fBdotfm\fP, then you will be prompted for
+an install location and aliases to call the dotfile by. If the
+\fB--skip\fP option was passed then the defaults will be used.
.RE
.TP
.B
-update <DOTFILE> <LOCATION>
-update the location that a previously installed dotfile (with an
-alias matching ALIAS) symlink points to (sets it to point to
-LOCATION).
+update, up <ALIAS> <DOTFILE>
+update the source DOTFILE path (of the \fBdotfm\fP-registered dotfile
+matching ALIAS) that DESTINATION points to.
.TP
.B
-remove <DOTFILE>\.\.\.
-Remove the file at the install location of the dotfile with an alias
-matching DOTFILE. This is a destructive function, use it carefully.
+remove, rm <ALIAS> \.\.\.
+If ALIAS is recognised, then the DESTINATION of the dotfile will be
+removed. This is a destructive function, use it carefully.
.RS
.PP
Will only remove the file if the file has been installed by \fBdotfm\fP
@@ -69,7 +82,7 @@ Will only remove the file if the file has been installed by \fBdotfm\fP
.RE
.TP
.B
-edit <DOTFILE> \.\.\.
+edit, ed <ALIAS> \.\.\.
Open DOTFILE in $EDITOR or nano if $EDITOR is not present.
.RS
.PP
@@ -77,19 +90,21 @@ DOTFILE should be an alias of the dotfile to edit.
.RE
.TP
.B
-list [<DOTFILE> \.\.\.]
+list, ls <ALIAS> \.\.\.
Print a table of the install locations and aliases for all
-dotfiles. If one or more DOTFILE arguments are present, then only
-dotfiles with matching aliases will be listed.
+registered dotfiles. If one or more DOTFILE arguments are present,
+then only dotfiles with matching aliases will be listed.
.SH INSTALL
Go to the source folder of \fBdotfm\fP and run "sudo make install" or "sudo
make link".
-.PP
+.RS
+.IP \(bu 3
"sudo make install" - copy \fBdotfm\fP to the install location (recommended
for most users).
-.PP
+.IP \(bu 3
"sudo make link" - create a symlink of \fBdotfm\fP from its current location
-to the install location (useful if you want to modify it frequently).
+to the install location (useful for development).
+.RE
.PP
By default the install location of \fBdotfm\fP is /usr/local/bin/\fBdotfm\fP. To
modify this, just edit the value of DESTBINDIR in the Makefile.
@@ -101,6 +116,10 @@ Go to the source folder of \fBdotfm\fP and run "sudo make uninstall".
EDITOR
The text editor to edit dotfiles with. If not present,
nano will be used.
+.TP
+.B
+HOME
+The home directory of the current user
.SH HINTS
I would recommend modifying the "KNOWN" array in src/ dotfm.py
to suite your own needs if i've missed any dotfiles you frequently use.