You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+70-78Lines changed: 70 additions & 78 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# opal
2
2
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
4
4
5
5
There are many different ways you can config a unix or linux system. There are
6
6
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.
14
14
2. cd into the new directory
15
15
3. Run the install script
16
16
17
-
$ ./install.bash
17
+
$ ./install.bash
18
18
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.
39
20
40
21
41
22
## WHAT'S IN HERE
@@ -48,6 +29,51 @@ included
48
29
49
30
## Bash Functions
50
31
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
+
51
77
PROMPT: A great way to display a line to text. Like echo, but types out the
52
78
characters one at a time, as if you typed it
53
79
@@ -63,9 +89,29 @@ argument whos value can be 'in' or 'out'
63
89
$ punch note "type a brief message here"
64
90
65
91
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
+
67
114
68
-
$ mkcd newdirectory
69
115
70
116
TODAY: display today's date in a number of formats. There are a few formats
71
117
to start of with. specify the type and optionally the format.
@@ -92,35 +138,6 @@ TOUCHX: Create an empty file and make it executable
92
138
$ touchx filename.txt
93
139
$ touchx info.php phpinfo
94
140
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
-
124
141
TRUNCATE: Remove the *contents* of a file without deleting it.
125
142
'Empty' is an alias
126
143
@@ -129,31 +146,6 @@ TRUNCATE: Remove the *contents* of a file without deleting it.
129
146
# You can also use
130
147
$ empty myfile.txt
131
148
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
0 commit comments