Skip to content

Commit 5a51ead

Browse files
committed
Improved README.md
Sorted the bash functions by name. Updated the intro and install process.
1 parent bce3918 commit 5a51ead

File tree

1 file changed

+70
-78
lines changed

1 file changed

+70
-78
lines changed

README.md

Lines changed: 70 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# opal
22

3-
a unix bootstrap of dotfiles with some useful additional utilities
3+
unix/linux dotfiles and utilities, reusable across machines/users, for people who love the command line
44

55
There are many different ways you can config a unix or linux system. There are
66
tons of dotfiles spread acoross the internet. But there isn't a cohesive set of
@@ -14,28 +14,9 @@ provide a reusable set of files.
1414
2. cd into the new directory
1515
3. Run the install script
1616

17-
$ ./install.bash
17+
$ ./install.bash
1818

19-
The vim and bash scripts are normally dot files that are located in your home directory. The files in this directory don't use dots at the beginning of the file for better user experience. They're here to give you a solid foundation for when you encounter a new environment, and to assist you in writing better code faster. You don't need to copy or edit them.
20-
21-
22-
One way to get started is to create symbolic links from your home dir to files
23-
in this project like so (assuming this directory is named ~/opal) :
24-
25-
$ cd ~
26-
$ ln -s opal/vimrc .vimrc
27-
$ ln -s opal/bashrc .bashrc
28-
$ ln -s opal/bash_profile .bash_profile
29-
30-
While that will work, it's not a good long term strategy. When you get an
31-
update from this project, you'll lose your changes. A better way to use is
32-
create a file in your home directory, and have it read the contents of the
33-
corresponding file in this project. This will allow you to receive all the
34-
updates of the project while keeping any customizations you make. Here's an
35-
example using the .vimrc file
36-
37-
$ cd ~
38-
$ vi .vimrc
19+
This creates a symbolic link in your home directory, to the directory where you ran the install script. Also, opal created a some dot files in your home directory - notably the .bashrc, .bash_profile, and .vimrc - to allow for your own customizations, while using opal resources. if you already had those files, don't panic - your files were backed up.
3920

4021

4122
## WHAT'S IN HERE
@@ -48,6 +29,51 @@ included
4829

4930
## Bash Functions
5031

32+
33+
CAL3: a 3 month calendar display - previous month, current month, and next month
34+
35+
$ cal3
36+
37+
38+
DEFINE: Retrieve the definition of a word
39+
40+
$ define ginger
41+
42+
43+
LSKEYS: Display a list of your SSH keys
44+
45+
$ lskeys
46+
47+
48+
MACH: display information about the current host.
49+
50+
$ mach
51+
52+
MKCD: Create a directory and go into it. accepts a single directory name.
53+
54+
$ mkcd newdirectory
55+
56+
NCAL3: a 3 month calendar displayed vertically - previous month, current month, and next month
57+
58+
$ ncal3
59+
60+
61+
NUMSEG: display part of a file, with line numbers prepended
62+
63+
display line 50, the 10 lines before/after it, with line numbers
64+
65+
$ numseg /etc/apache2/httpd.conf 50
66+
67+
display lines 32 through 48 with line numbers
68+
69+
$ numseg /etc/apache2/httpd.conf 32 48
70+
71+
72+
PREAMBLE: Display a login message about who and where you are.
73+
74+
$ preamble
75+
76+
5177
PROMPT: A great way to display a line to text. Like echo, but types out the
5278
characters one at a time, as if you typed it
5379

@@ -63,9 +89,29 @@ argument whos value can be 'in' or 'out'
6389
$ punch note "type a brief message here"
6490

6591

66-
MKCD: Create a directory and go into it. accepts a single directory name.
92+
SHOW: display information about different types of info in the shell. the
93+
output for each of the arguments depends on your system.
94+
95+
```bash
96+
97+
$ show
98+
99+
# arrays - display known arrays
100+
# names - display function names only
101+
# defs - display functions names and their definitions
102+
# readonly - display all the readonly variables
103+
# export - display all exported variables
104+
# integers - display all integers
105+
106+
$ show names
107+
```
108+
109+
SHOW_DOTFILES: enable/disable display of hidden dotfiles in OS X finder
110+
111+
$ show_dotfiles true
112+
$ show_dotfiles false
113+
67114

68-
$ mkcd newdirectory
69115

70116
TODAY: display today's date in a number of formats. There are a few formats
71117
to start of with. specify the type and optionally the format.
@@ -92,35 +138,6 @@ TOUCHX: Create an empty file and make it executable
92138
$ touchx filename.txt
93139
$ touchx info.php phpinfo
94140

95-
MACH: display information about the current host.
96-
97-
$ mach
98-
99-
SHOW: display information about different types of info in the shell. the
100-
output for each of the arguments depends on your system.
101-
102-
```bash
103-
104-
$ show
105-
106-
# arrays - display known arrays
107-
# names - display function names only
108-
# defs - display functions names and their definitions
109-
# readonly - display all the readonly variables
110-
# export - display all exported variables
111-
# integers - display all integers
112-
113-
$ show names
114-
```
115-
116-
PREAMBLE: Display a login message about who and where you are.
117-
118-
$ preamble
119-
120-
LSKEYS: Display a list of your SSH keys
121-
122-
$ lskeys
123-
124141
TRUNCATE: Remove the *contents* of a file without deleting it.
125142
'Empty' is an alias
126143

@@ -129,31 +146,6 @@ TRUNCATE: Remove the *contents* of a file without deleting it.
129146
# You can also use
130147
$ empty myfile.txt
131148

132-
DEFINE: Retrieve the definition of a word
133-
134-
$ define ginger
135-
136-
SHOW_DOTFILES: enable/disable display of hidden dotfiles in OS X finder
137-
138-
$ show_dotfiles true
139-
$ show_dotfiles false
140-
141-
142-
NUMSEG: display part of a file, with line numbers prepended
143-
144-
disply line 50, the 10 lines before/after it, with line numbers
145-
146-
$ numseg /etc/apache2/httpd.conf 50
147-
148-
disply lines 32 through 48 with line numbers
149-
150-
$ numseg /etc/apache2/httpd.conf 32 48
151-
152-
CAL3: a 3 month calendar display - previous month, current month, and next month
153-
154-
$ cal3
155-
156-
157149

158150
## Vim Files
159151

0 commit comments

Comments
 (0)