@sebastienrousseau/dotfiles 0.2.452 → 0.2.453
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COPYRIGHT +1 -1
- package/Makefile +1 -1
- package/README.md +111 -48
- package/bin/dotfiles.sh +13 -6
- package/package.json +2 -2
- package/pnpm-lock.yaml +140 -86
- package/shell/aliases/default/default.aliases.sh +1 -1
- package/shell/aliases/gcloud/gcloud.aliases.sh +1 -1
- package/shell/aliases/git/git.aliases.wip +1 -1
- package/shell/aliases/heroku/heroku.aliases.sh +1 -1
- package/shell/aliases/jekyll/jekyll.aliases.sh +1 -1
- package/shell/aliases/pnpm/pnpm.aliases.sh +1 -1
- package/shell/aliases/subversion/subversion.aliases.sh +1 -1
- package/shell/aliases/tmux/tmux.aliases.sh +1 -1
- package/shell/aliases.sh +1 -1
- package/shell/configurations/bash/bashrc +2 -2
- package/shell/configurations/curl/curlrc +1 -1
- package/shell/configurations/default/color.sh +1 -1
- package/shell/configurations/default/editor.sh +1 -1
- package/shell/configurations/default/prompt.sh +6 -6
- package/shell/configurations/inputrc/inputrc +2 -2
- package/shell/configurations/profile/profile +1 -1
- package/shell/configurations/tmux/tmux +2 -2
- package/shell/configurations/vim/vimrc +1 -1
- package/shell/configurations/wget/wgetrc +1 -1
- package/shell/configurations/zsh/zshrc +12 -2
- package/shell/configurations.sh +1 -1
- package/shell/exit.sh +1 -1
- package/shell/functions/cdls.sh +1 -1
- package/shell/functions/{changediskpwd.sh → changediskpwd.wip} +1 -1
- package/shell/functions/{code.sh → code.wip} +1 -1
- package/shell/functions/{countdown.sh → countdown.wip} +1 -1
- package/shell/functions/curlheader.sh +1 -1
- package/shell/functions/curltime.sh +1 -1
- package/shell/functions/encode64.sh +1 -1
- package/shell/functions/environment.sh +8 -8
- package/shell/functions/extract.sh +2 -2
- package/shell/functions/genpwd.sh +1 -1
- package/shell/functions/goto.sh +2 -2
- package/shell/functions/{headers.sh → headers.wip} +0 -0
- package/shell/functions/hidehiddenfiles.sh +1 -1
- package/shell/functions/{history-all.sh → history-all.wip} +1 -1
- package/shell/functions/hostinfo.sh +1 -1
- package/shell/functions/hstats.sh +1 -1
- package/shell/functions/httpdebug.sh +1 -1
- package/shell/functions/keygen.sh +4 -4
- package/shell/functions/last.sh +1 -1
- package/shell/functions/logout.sh +1 -1
- package/shell/functions/lowercase.sh +1 -1
- package/shell/functions/macos.sh +1 -1
- package/shell/functions/matrix.sh +1 -1
- package/shell/functions/mcd.sh +1 -1
- package/shell/functions/mount_read_only.sh +1 -1
- package/shell/functions/myproc.sh +2 -2
- package/shell/functions/prependpath.sh +1 -1
- package/shell/functions/print.wip +13 -0
- package/shell/functions/ql.sh +1 -1
- package/shell/functions/rd.sh +1 -1
- package/shell/functions/remove_disk.sh +1 -1
- package/shell/functions/ren.sh +2 -2
- package/shell/functions/{rm.sh → rm.wip} +1 -1
- package/shell/functions/{rps.sh → rps.wip} +1 -1
- package/shell/functions/showhiddenfiles.sh +1 -1
- package/shell/functions/size.sh +1 -1
- package/shell/functions/stopwatch.sh +1 -1
- package/shell/functions/{trash.sh → trash.wip} +1 -1
- package/shell/functions/{tree.sh → tree.wip} +1 -1
- package/shell/functions/uppercase.sh +2 -2
- package/shell/functions/uuidgen.wip +27 -0
- package/shell/functions/view-source.sh +1 -1
- package/shell/functions/vscode.sh +1 -1
- package/shell/functions/whoisport.sh +1 -1
- package/shell/functions/zipf.sh +1 -1
- package/shell/functions.sh +1 -1
- package/shell/history.sh +3 -6
- package/shell/paths/ant/ant.paths.sh +1 -1
- package/shell/paths/default/default.paths.sh +1 -1
- package/shell/paths/homebrew/homebrew.paths.sh +4 -1
- package/shell/paths/java/java.paths.sh +1 -1
- package/shell/paths/maven/maven.paths.sh +3 -2
- package/shell/paths/node/node.paths.sh +2 -2
- package/shell/paths/nvm/nvm.paths.sh +1 -1
- package/shell/paths/pnpm/pnpm.paths.sh +2 -2
- package/shell/paths/python/python.paths.sh +19 -0
- package/shell/paths/ruby/ruby.paths.sh +1 -1
- package/shell/paths/tmux/tmux.paths.sh +2 -3
- package/shell/paths.sh +1 -1
- package/shell/aliases/README.md +0 -327
- package/shell/aliases/gcloud/README.md +0 -117
- package/shell/aliases/git/README.md +0 -279
- package/shell/aliases/heroku/README.md +0 -457
- package/shell/aliases/jekyll/README.md +0 -32
- package/shell/aliases/pnpm/README.md +0 -3
- package/shell/aliases/subversion/README.md +0 -54
- package/shell/aliases/tmux/README.md +0 -0
- package/shell/functions/print.sh +0 -13
- package/shell/functions/uuidgen.sh +0 -27
package/shell/aliases/README.md
DELETED
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
# Dotfiles aliases
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
This aliases.zsh file creates helpful shortcut aliases for many commonly used commands.
|
|
6
|
-
|
|
7
|
-
## Table of Contents
|
|
8
|
-
|
|
9
|
-
- [Dotfiles aliases](#dotfiles-aliases)
|
|
10
|
-
- [Table of Contents](#table-of-contents)
|
|
11
|
-
- [1. System detection utility](#1-system-detection-utility)
|
|
12
|
-
- [1.1 Checking the aliases already installed](#11-checking-the-aliases-already-installed)
|
|
13
|
-
- [1.2 Swapping to the collection of GNU find, xargs, and locate](#12-swapping-to-the-collection-of-gnu-find-xargs-and-locate)
|
|
14
|
-
- [Aliases for the GNU coreutils (Core GNU utilities) programs](#aliases-for-the-gnu-coreutils-core-gnu-utilities-programs)
|
|
15
|
-
- [2. System tools and system information aliases](#2-system-tools-and-system-information-aliases)
|
|
16
|
-
- [2.1 System tools aliases](#21-system-tools-aliases)
|
|
17
|
-
- [2.2 System information aliases](#22-system-information-aliases)
|
|
18
|
-
- [2.3 Interactive mode commands](#23-interactive-mode-commands)
|
|
19
|
-
- [Interactive mode aliases](#interactive-mode-aliases)
|
|
20
|
-
- [3. Common shell aliases](#3-common-shell-aliases)
|
|
21
|
-
- [3.1 Generic aliases](#31-generic-aliases)
|
|
22
|
-
- [3.2 Finding commands (find and grep)](#32-finding-commands-find-and-grep)
|
|
23
|
-
- [3.3 List directory aliases commands (ls)](#33-list-directory-aliases-commands-ls)
|
|
24
|
-
- [3.4 Networking aliases](#34-networking-aliases)
|
|
25
|
-
- [3.5 Quicker navigation aliases](#35-quicker-navigation-aliases)
|
|
26
|
-
- [3.6 Jekyll Aliases](#36-jekyll-aliases)
|
|
27
|
-
- [Global aliases](#global-aliases)
|
|
28
|
-
- [File extension aliases](#file-extension-aliases)
|
|
29
|
-
- [Reading Docs](#reading-docs)
|
|
30
|
-
- [Listing files inside a packed file](#listing-files-inside-a-packed-file)
|
|
31
|
-
|
|
32
|
-
### 1. System detection utility
|
|
33
|
-
|
|
34
|
-
The `aliases.plugin.zsh` file contains a system detection utility that identifies
|
|
35
|
-
which `ls` flavor is in use. (GNU or macOS) in order to help setting up the right
|
|
36
|
-
`LS_COLORS` environment variables to your Z Shell.
|
|
37
|
-
|
|
38
|
-
#### 1.1 Checking the aliases already installed
|
|
39
|
-
|
|
40
|
-
Type the following alias command in your terminal:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
alias
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
#### 1.2 Swapping to the collection of GNU find, xargs, and locate
|
|
47
|
-
|
|
48
|
-
macOS systems are based on BSD, rather than on GNU/Linux like RedHat, Debian, and
|
|
49
|
-
Ubuntu. As a result, a lot of the command line tools that ship with macOS aren’t
|
|
50
|
-
100% compatible.
|
|
51
|
-
|
|
52
|
-
The GNU Find Utilities are the basic directory searching utilities of the GNU
|
|
53
|
-
operating system. These programs are typically used in conjunction with other
|
|
54
|
-
programs to provide modular and powerful directory search and file locating
|
|
55
|
-
capabilities to other commands.
|
|
56
|
-
|
|
57
|
-
The tools supplied with this package are:
|
|
58
|
-
|
|
59
|
-
- find - search for files in a directory hierarchy
|
|
60
|
-
- locate - list files in databases that match a pattern
|
|
61
|
-
- updatedb - update a file name database
|
|
62
|
-
- xargs - build and execute command lines from standard input
|
|
63
|
-
|
|
64
|
-
Type the following alias command in your terminal:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
brew install findutils
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
##### Aliases for the GNU coreutils (Core GNU utilities) programs
|
|
71
|
-
|
|
72
|
-
| Alias | Command | Description |
|
|
73
|
-
|-------|-------------|-------------------------|
|
|
74
|
-
| dircolors | `gdircolors` | Color setup for ls. |
|
|
75
|
-
| find | `gfind` | Search for files in a directory hierarchy. |
|
|
76
|
-
| grep | `ggrep` | File pattern searcher. |
|
|
77
|
-
| readlink | `greadlink` |Display file status. |
|
|
78
|
-
| sed | `gsed` | Stream editor. |
|
|
79
|
-
| sort | `gsort` | Sort or merge records (lines) of text and binary files. |
|
|
80
|
-
|
|
81
|
-
### 2. System tools and system information aliases
|
|
82
|
-
|
|
83
|
-
#### 2.1 System tools aliases
|
|
84
|
-
|
|
85
|
-
| Alias | Command | Description |
|
|
86
|
-
|-------|-------------|-------------------------|
|
|
87
|
-
| htop | `sudo htop` | Append sudo to htop (interactive process viewer) command. |
|
|
88
|
-
| ifconfig | `sudo ifconfig` | Append sudo to ifconfig (configure network interface parameters) command. |
|
|
89
|
-
| iotop | `sudo iotop` | Append sudo to iotop (display top disk I/O events by process) command. |
|
|
90
|
-
| iptables | `sudo iptables` | Append sudo to iptables (Append sudo to iptables (Administration tool for packet filtering) command. |
|
|
91
|
-
| purge | `rm -rf ~/library/Developer/Xcode/DerivedData/*` | Purging Xcode DerivedData. |
|
|
92
|
-
| reload | `reset` | Reset and initialize the Terminal screen. |
|
|
93
|
-
| sudo | `sudo` | Allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments. |
|
|
94
|
-
| top | `htop` | Allows the user to interactively monitor the system's vital resources or server's processes in real time. |
|
|
95
|
-
| ttop | `top -F -s 10 rsize` | Recommended 'top' invocation to minimize resources. |
|
|
96
|
-
| zshrc | `${=EDITOR} $HOME/.zshrc` | Quick access to the `.zshrc` file. |
|
|
97
|
-
|
|
98
|
-
#### 2.2 System information aliases
|
|
99
|
-
|
|
100
|
-
| Alias | Command | Description |
|
|
101
|
-
|-------|-------------|-------------------------|
|
|
102
|
-
| kp | `ps auxwww` | Getting full path of executables. The "auxwww" are options to the ps (process) command. The options mean display all process running that belong to you and to other users and provide information about who owns what process. The three "www"'s mean display the entire command line regardless of how long it is and wrap it in your window. |
|
|
103
|
-
| pid | `ps -f` | Display the uid, pid, parent pid, recent CPU usage, process start time, controlling tty, elapsed CPU usage, and the associated command. |
|
|
104
|
-
| ping | `ping -c 5` | Limit Ping to 5 ECHO_REQUEST packets. |
|
|
105
|
-
| ports | `netstat -tulan` | Display ports |
|
|
106
|
-
| pscpu | `ps aux | sort -nr -k 3 | head -3` | Getting top 3 CPU eating processes. |
|
|
107
|
-
| pscpu10 | `ps aux | sort -nr -k 3 | head -10` | Getting top 10 CPU eating processes. |
|
|
108
|
-
| psmem | `ps aux | sort -nr -k 4 | head -3` | Getting top 3 memory eating processes. |
|
|
109
|
-
| psmem10 | `ps aux | sort -nr -k 4 | head -10` | Getting top 10 memory eating processes. |
|
|
110
|
-
|
|
111
|
-
#### 2.3 Interactive mode commands
|
|
112
|
-
|
|
113
|
-
##### Interactive mode aliases
|
|
114
|
-
|
|
115
|
-
| Alias | Command | Description |
|
|
116
|
-
|-------|-------------|--------------------------|
|
|
117
|
-
| cp | `cp -i` | Copy files with warning. |
|
|
118
|
-
| ln | `ln -i` | Make links with warning. |
|
|
119
|
-
| mv | `mv -i` | Move files with warning. |
|
|
120
|
-
| rm | `rm -i` | Remove file with warning.|
|
|
121
|
-
| zap | `rm -i` | Remove file with warning.|
|
|
122
|
-
|
|
123
|
-
### 3. Common shell aliases
|
|
124
|
-
|
|
125
|
-
#### 3.1 Generic aliases
|
|
126
|
-
|
|
127
|
-
| Alias | Command | Description |
|
|
128
|
-
|-------|-------------|-------------------------|
|
|
129
|
-
| c | `clear && printf '\e[3J'` | Clear screen shortcut. |
|
|
130
|
-
| cls | `clear && printf '\e[3J` | Clear screen command. |
|
|
131
|
-
| countf | `echo $(ls -1 | wc -l)` | Count of non-hidden files in current dir. |
|
|
132
|
-
| dt | `tee $HOME/terminal-$(date +%F).txt` | Pipe content to file in the $HOME directory. |
|
|
133
|
-
| du | `du -h` | File size human readable output sorted by size. |
|
|
134
|
-
| dud | `du -d 1 -h` | File size human readable output sorted by depth. |
|
|
135
|
-
| duf | `du -sh *` | File size human readable output sorted. |
|
|
136
|
-
| egz | `tar -xvzf` | Extract a whole directory (including subdirectories). |
|
|
137
|
-
| flush | `sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder` | Flush the directory service cache and restart the multi-cast DNS daemon. |
|
|
138
|
-
| gz | `tar -zcvf` | Compress a whole directory (including subdirectories). |
|
|
139
|
-
| h | `history` | Lists all recently used commands. |
|
|
140
|
-
| hs | `history | grep` | Use grep to search the command history. |
|
|
141
|
-
| hsi | `history | grep -i` | Use grep to do a case-insensitive search of the command history. |
|
|
142
|
-
| locale | `locale -a | grep UTF-8` | Check UTF-8 locale. |
|
|
143
|
-
| mkdir | `mkdir -pv` | Create the directory and all parent directories, verbose mode. |
|
|
144
|
-
| p | `pwd` | Shortcut for `pwd` which returns working directory name. |
|
|
145
|
-
| path | `echo -e ${PATH//:/\\n}` | Display the $PATH variable on newlines. |
|
|
146
|
-
| q | `exit` | Shortcut for the `exit` command. |
|
|
147
|
-
| r | `reload` | Shortcut for the `reload` command. |
|
|
148
|
-
| reboot | `sudo shutdown -r now` | Restart immediately. |
|
|
149
|
-
| reload | `. ~/.zshrc` | Reload the Z shell. |
|
|
150
|
-
| rp | `diskutil repairPermissions /` | Repair macOS Permissions. |
|
|
151
|
-
| rv | `diskutil repairvolume /` | diskutil repairvolume / |
|
|
152
|
-
| rmdir | `rm –rf` | Remove directory. |
|
|
153
|
-
| shutdown | `sudo shutdown -h now` | Shutdown immediately. |
|
|
154
|
-
| sort | `LC_ALL=C sort` | Fix sorting order |
|
|
155
|
-
| sortnr | `sort -n -r` | Sort in a descending order according to numerical value. |
|
|
156
|
-
| t | `tail -f` | Prints the last 10 lines of a text or log file, and then waits for new additions to the file to print it in real time. |
|
|
157
|
-
| vp | `diskutil verifyPermissions /` | Verify macOS Permissions |
|
|
158
|
-
| vv | `diskutil verifyvolume /` | Verify macOS Volume |
|
|
159
|
-
|
|
160
|
-
#### 3.2 Finding commands (find and grep)
|
|
161
|
-
|
|
162
|
-
| Alias | Command | Description |
|
|
163
|
-
|-------|-----------------------------------------------------|-----------------------------------------|
|
|
164
|
-
| egrep | `egrep --color` | Searches that can handle extended regular expressions (EREs). |
|
|
165
|
-
| fd | `find . -type d -name` | Find a directory with a given name. |
|
|
166
|
-
| ff | `find . -type f -name` | Find a file with a given name. |
|
|
167
|
-
| fgrep | `fgrep --color` | Searches that can only handle fixed patterns. |
|
|
168
|
-
| grep | `grep --color` | Searches for a query string. |
|
|
169
|
-
| hgrep | `history | grep` | Searches for a word in the list of previously used commands. |
|
|
170
|
-
| sgrep | `grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}` | Useful for searching within files. |
|
|
171
|
-
|
|
172
|
-
#### 3.3 List directory aliases commands (ls)
|
|
173
|
-
|
|
174
|
-
| Alias | Command |Description |
|
|
175
|
-
|-------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
|
|
176
|
-
| l | `ls -lFh` | Size, show type, human readable. |
|
|
177
|
-
| l1 | `ls -1` | Display one file per line. |
|
|
178
|
-
| la | `ls -lAFh` | Long list, show almost all, show type, human readable. |
|
|
179
|
-
| lart | `ls -1Fcart` | Force output to be one entry per line, last changed, includes directory entries whose names begin with a dot, reverse, sort by time modified. |
|
|
180
|
-
| last | `ls -t` | Sorts all files by modification time, showing the last edited file first. |
|
|
181
|
-
| lc | `ls -ltcr` | Sort by/show change time,most recent last. |
|
|
182
|
-
| ld | `ls -ld` | Display directory information. |
|
|
183
|
-
| ldot | `ls -ld .*` | Display only dot files. |
|
|
184
|
-
| lf | `ls -lf` | Visual Classification of Files With Special Characters. |
|
|
185
|
-
| lh | `ls -lh` | Display file size in human readable format. |
|
|
186
|
-
| li | `ls -i` | Display File Inode Number. |
|
|
187
|
-
| lk | `ls -lSr` | Sort by size, biggest last. |
|
|
188
|
-
| ll | `ls -lghFG | sort -n -td -k2` | Long list. |
|
|
189
|
-
| ln | `ls -n` | Display File UID and GID. |
|
|
190
|
-
| lq | `ls -q` | Hide Control Characters. |
|
|
191
|
-
| lr | `ls -tRFh` | Display Files Recursively sorted by date, recursive, show type, human readable. |
|
|
192
|
-
| lrt | `ls -1Fcrt` | Order Files Based on Last Modified Time (In Reverse Order). |
|
|
193
|
-
| lS | `ls -1FSsh` | Order Files Based on Last Modified Time and size. |
|
|
194
|
-
| lsd | `ls -l | grep "^d"` | Display only directories. |
|
|
195
|
-
| lt | `ls -ltFh` | Display Files long list, sorted by date, show type, human readable. |
|
|
196
|
-
| ltr | `ls -ltr` | Sort by date, most recent last. |
|
|
197
|
-
| lu | `ls -ltur` | Sort by/show access time,most recent last. |
|
|
198
|
-
| lx | `ls -lXB` | Sort by extension. |
|
|
199
|
-
|
|
200
|
-
#### 3.4 Networking aliases
|
|
201
|
-
|
|
202
|
-
| Alias | Command | Description |
|
|
203
|
-
|-----------|---------------------|-------------------------------------------------------------|
|
|
204
|
-
| ipInfo0 | `ipconfig getpacket en0` | Get info on connections for en0. |
|
|
205
|
-
| ipInfo1 | `ipconfig getpacket en1` | Get info on connections for en1. |
|
|
206
|
-
| lsock | `sudo /usr/sbin/lsof -i -P` | Display open sockets. |
|
|
207
|
-
| lsockTCP | `sudo /usr/sbin/lsof -nP | grep TCP` | Display only open TCP sockets. |
|
|
208
|
-
| lsockUDP | `sudo /usr/sbin/lsof -nP | grep UDP` | Display only open UDP sockets. |
|
|
209
|
-
| lsof | `lsof -i` | Show all open TCP/IP sockets. |
|
|
210
|
-
| mic | `sudo lsof -i | grep LISTEN` | Listening to all connections. |
|
|
211
|
-
| op | `sudo lsof -i -P` | List of open ports. |
|
|
212
|
-
| wip | `dig +short myip.opendns.com @resolver1.opendns.com` | Public facing IP Address. |
|
|
213
|
-
|
|
214
|
-
#### 3.5 Quicker navigation aliases
|
|
215
|
-
|
|
216
|
-
| Alias | Command | Description |
|
|
217
|
-
|-----------|---------------------|-------------------------------------------------------------|
|
|
218
|
-
| ~ | `cd ~` | Change to $HOME directory. |
|
|
219
|
-
| cd. | `cd -P .` | Show true (physical) path instead of symbolic links in the path. |
|
|
220
|
-
| cd/ | `cd /; ls` | Change to / root directory and show the directory content. |
|
|
221
|
-
| gitRoot | `cd "$(git rev-parse --show-toplevel)"` | Change to Git Root directory. |
|
|
222
|
-
| . | `cd ..; ls` | Move back to one level and show the directory content. |
|
|
223
|
-
| .. | `cd ../..; ls` | Move back to two levels and show the directory content. |
|
|
224
|
-
| ... | `cd ../../..; ls` | Move back to three levels and show the directory content. |
|
|
225
|
-
| .... | `cd ../../../..; ls` | Move back to four levels and show the directory content. |
|
|
226
|
-
| ..... | `cd ../../../../..; ls` | Move back to five levels and show the directory content. |
|
|
227
|
-
| cd . | `cd .; ls` | Move back to one level and show the directory content. |
|
|
228
|
-
| cd .. | `cd ..; ls` | Move back to two levels and show the directory content. |
|
|
229
|
-
| cd ... | `cd ...; ls` | Move back to three levels and show the directory content. |
|
|
230
|
-
| cd .... | `cd ....; ls` | Move back to four levels and show the directory content. |
|
|
231
|
-
| cd ..... | `cd .....; ls` | Move back to five levels and show the directory content. |
|
|
232
|
-
| - | `cd -; ls` | Navigate to the previous one level directory (or back) and show the directory content. |
|
|
233
|
-
| -- | `cd -2; ls` | Navigate to the previous two levels directory (or back) and show the directory content. |
|
|
234
|
-
| --- | `cd -3; ls` | Navigate to the previous three levels directory (or back) and show the directory content. |
|
|
235
|
-
| ---- | `cd -4; ls` | Navigate to the previous four levels directory (or back) and show the directory content. |
|
|
236
|
-
| ----- | `cd -5; ls` | Navigate to the previous five levels directory (or back) and show the directory content. |
|
|
237
|
-
| 1 | `cd -; ls` | Navigate to the previous one level directory (or back) and show the directory content. |
|
|
238
|
-
| 2 | `cd -2; ls` | Navigate to the previous two levels directory (or back) and show the directory content. |
|
|
239
|
-
| 3 | `cd -3; ls` | Navigate to the previous three levels directory (or back) and show the directory content. |
|
|
240
|
-
| 4 | `cd -4; ls` | Navigate to the previous four levels directory (or back) and show the directory content. |
|
|
241
|
-
| 5 | `cd -5; ls` | Navigate to the previous five levels directory (or back) and show the directory content. |
|
|
242
|
-
| 1. | `cd ..; ls` | Move back to one level and show the directory content. |
|
|
243
|
-
| 2. | `cd ../..; ls` | Move back to two levels and show the directory content. |
|
|
244
|
-
| 3. | `cd ../../..; ls` | Move back to three levels and show the directory content. |
|
|
245
|
-
| 4. | `cd ../../../..; ls` | Move back to four levels and show the directory content. |
|
|
246
|
-
| 5. | `cd ../../../../..; ls` | Move back to five levels and show the directory content. |
|
|
247
|
-
| cd 1. | `cd ..; ls` | Move back to one level and show the directory content. |
|
|
248
|
-
| cd 2. | `cd ../..; ls` | Move back to two levels and show the directory content. |
|
|
249
|
-
| cd 3. | `cd ../../..; ls` | Move back to three levels and show the directory content. |
|
|
250
|
-
| cd 4. | `cd ../../../..; ls` | Move back to four levels and show the directory content. |
|
|
251
|
-
| cd 5. | `cd ../../../../..; ls` | Move back to five levels and show the directory content. |
|
|
252
|
-
| less | `less -R` | Make less always work with colored input. |
|
|
253
|
-
| openDir | `open -a Finder ./` | Open any folder from macOS Terminal. |
|
|
254
|
-
| path | `echo "$PATH" | tr ":" "\n" | nl` | Display or print $PATH variable. |
|
|
255
|
-
| so | `setopt` | Lists the active options. |
|
|
256
|
-
| uso | `unsetopt` | Lists the inactive options. |
|
|
257
|
-
|
|
258
|
-
#### 3.6 Jekyll Aliases
|
|
259
|
-
|
|
260
|
-
| Alias | Command | Description |
|
|
261
|
-
|-----------|---------------------|-------------------------------------------------------------|
|
|
262
|
-
| jkd | `JEKYLL_ENV=development bundle exec jekyll serve --watch --trace` | Does a development build of the site to `_site` and runs a local development server. |
|
|
263
|
-
| jkb | `JEKYLL_ENV=development bundle exec jekyll build` | Performs a one off build your site to `./_site`. |
|
|
264
|
-
| jkc | `JEKYLL_ENV=development bundle exec jekyll clean` | Removes all generated files: destination folder, metadata file, Sass and Jekyll caches. |
|
|
265
|
-
| jkl | `JEKYLL_ENV=development bundle exec jekyll serve --livereload` | Does a development build of the site to '_site' and runs a local development server. |
|
|
266
|
-
| jko | `open http://localhost:4000` | Open local development server. |
|
|
267
|
-
| jkp | `JEKYLL_ENV=production bundle exec jekyll serve --watch --trace` | Does a production build of the site to '_site' and runs a local development server. |
|
|
268
|
-
|
|
269
|
-
## Global aliases
|
|
270
|
-
|
|
271
|
-
These aliases are expanded in any position in the command line, meaning you can use them even at the
|
|
272
|
-
end of the command you've typed. Examples:
|
|
273
|
-
|
|
274
|
-
Quickly pipe to less:
|
|
275
|
-
|
|
276
|
-
```zsh
|
|
277
|
-
$ ls -l /var/log L
|
|
278
|
-
# will run
|
|
279
|
-
$ ls -l /var/log | less
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
Silences stderr output:
|
|
283
|
-
|
|
284
|
-
```zsh
|
|
285
|
-
$ find . -type f NE
|
|
286
|
-
# will run
|
|
287
|
-
$ find . -type f 2>/dev/null
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
| Alias | Command | Description |
|
|
291
|
-
|-------|-----------------------------|-------------------------------------------------------------|
|
|
292
|
-
| H | `\| head` | Pipes output to head which outputs the first part of a file |
|
|
293
|
-
| T | `\| tail` | Pipes output to tail which outputs the last part of a file |
|
|
294
|
-
| G | `\| grep` | Pipes output to grep to search for some word |
|
|
295
|
-
| L | `\| less` | Pipes output to less, useful for paging |
|
|
296
|
-
| M | `\| most` | Pipes output to more, useful for paging |
|
|
297
|
-
| LL | `2>&1 \| less` | Writes stderr to stdout and passes it to less |
|
|
298
|
-
| CA | `2>&1 \| cat -A` | Writes stderr to stdout and passes it to cat |
|
|
299
|
-
| NE | `2 > /dev/null` | Silences stderr |
|
|
300
|
-
| NUL | `> /dev/null 2>&1` | Silences both stdout and stderr |
|
|
301
|
-
| P | `2>&1\| pygmentize -l pytb` | Writes stderr to stdout and passes it to pygmentize |
|
|
302
|
-
|
|
303
|
-
## File extension aliases
|
|
304
|
-
|
|
305
|
-
These are special aliases that are triggered when a file name is passed as the command. For example,
|
|
306
|
-
if the pdf file extension is aliased to `acroread` (a popular Linux pdf reader), when running `file.pdf`
|
|
307
|
-
that file will be open with `acroread`.
|
|
308
|
-
|
|
309
|
-
### Reading Docs
|
|
310
|
-
|
|
311
|
-
| Alias | Command | Description |
|
|
312
|
-
|-------|-------------|-------------------------------------|
|
|
313
|
-
| pdf | `acroread` | Opens up a document using acroread |
|
|
314
|
-
| ps | `gv` | Opens up a .ps file using gv |
|
|
315
|
-
| dvi | `xdvi` | Opens up a .dvi file using xdvi |
|
|
316
|
-
| chm | `xchm` | Opens up a .chm file using xchm |
|
|
317
|
-
| djvu | `djview` | Opens up a .djvu file using djview |
|
|
318
|
-
|
|
319
|
-
### Listing files inside a packed file
|
|
320
|
-
|
|
321
|
-
| Alias | Command | Description |
|
|
322
|
-
|---------|-------------|-------------------------------------|
|
|
323
|
-
| zip | `unzip -l` | Lists files inside a .zip file |
|
|
324
|
-
| rar | `unrar l` | Lists files inside a .rar file |
|
|
325
|
-
| tar | `tar tf` | Lists files inside a .tar file |
|
|
326
|
-
| tar.gz | `echo` | Lists files inside a .tar.gz file |
|
|
327
|
-
| ace | `unace l` | Lists files inside a .ace file |
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# Dotfiles aliases
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
The `gcloud.plugin.zsh` file creates helpful shortcut aliases for many commonly
|
|
6
|
-
[Google Cloud](https://cloud.google.com/) commands.
|
|
7
|
-
|
|
8
|
-
## Table of Contents
|
|
9
|
-
|
|
10
|
-
- [Dotfiles aliases](#dotfiles-aliases)
|
|
11
|
-
- [Table of Contents](#table-of-contents)
|
|
12
|
-
- [1.0 Google Cloud Aliases](#10-google-cloud-aliases)
|
|
13
|
-
- [1.1 Aliases to get going with the gcloud command-line tool](#11-aliases-to-get-going-with-the-gcloud-command-line-tool)
|
|
14
|
-
- [1.2 Aliases to make the Cloud SDK your own; personalize your configuration with properties](#12-aliases-to-make-the-cloud-sdk-your-own-personalize-your-configuration-with-properties)
|
|
15
|
-
- [1.3 Aliases to grant and revoke authorization to Cloud SDK](#13-aliases-to-grant-and-revoke-authorization-to-cloud-sdk)
|
|
16
|
-
- [1.4 Aliases to configuring Cloud Identity & Access Management (IAM) preferences and service accounts](#14-aliases-to-configuring-cloud-identity--access-management-iam-preferences-and-service-accounts)
|
|
17
|
-
- [1.5 Aliases to manage project access policies](#15-aliases-to-manage-project-access-policies)
|
|
18
|
-
- [1.6 Aliases to manage containerized applications on Kubernetes](#16-aliases-to-manage-containerized-applications-on-kubernetes)
|
|
19
|
-
- [1.7 Aliases to create, run, and manage VMs on Google infrastructure](#17-aliases-to-create-run-and-manage-vms-on-google-infrastructure)
|
|
20
|
-
- [1.8 Aliases to build highly scalable applications on a fully managed serverless platform](#18-aliases-to-build-highly-scalable-applications-on-a-fully-managed-serverless-platform)
|
|
21
|
-
- [1.9 Aliases to commands that might come in handy](#19-aliases-to-commands-that-might-come-in-handy)
|
|
22
|
-
|
|
23
|
-
### 1.0 Google Cloud Aliases
|
|
24
|
-
|
|
25
|
-
### 1.1 Aliases to get going with the gcloud command-line tool
|
|
26
|
-
|
|
27
|
-
| Alias | Command | Description |
|
|
28
|
-
| ----- | ---------------------------------------- | -------------------------------------------------- |
|
|
29
|
-
| gcci | `gcloud components install` | Install specific components. |
|
|
30
|
-
| gccsp | `gcloud config set project` | Set a default Google Cloud project to work on. |
|
|
31
|
-
| gccu | `gcloud components update` | Update your Cloud SDK to the latest version. |
|
|
32
|
-
| gci | `gcloud init` | Initialize, authorize, and configure the gcloud tool. |
|
|
33
|
-
| gcinf | `gcloud info` | Display current gcloud tool environment details. |
|
|
34
|
-
| gcv | `gcloud version` | Display version and installed components. |
|
|
35
|
-
|
|
36
|
-
### 1.2 Aliases to make the Cloud SDK your own; personalize your configuration with properties
|
|
37
|
-
|
|
38
|
-
| Alias | Command | Description |
|
|
39
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
40
|
-
| gccca | `gcloud config configurations activate` | Switch to an existing named configuration. |
|
|
41
|
-
| gcccc | `gcloud config configurations create` | Create a new named configuration. |
|
|
42
|
-
| gcccl | `gcloud config configurations list` | Display a list of all available configurations. |
|
|
43
|
-
| gccgv | `gcloud config get-value` | Fetch value of a Cloud SDK property. |
|
|
44
|
-
| gccl | `gcloud config list` | Display all the properties for the current configuration. |
|
|
45
|
-
| gccs | `gcloud config set` | Define a property (like compute/zone) for the current configuration. |
|
|
46
|
-
|
|
47
|
-
### 1.3 Aliases to grant and revoke authorization to Cloud SDK
|
|
48
|
-
|
|
49
|
-
| Alias | Command | Description |
|
|
50
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
51
|
-
| gcaasa | `gcloud auth activate-service-account` | Like gcloud auth login but with service account credentials. |
|
|
52
|
-
| gcacd | `gcloud auth configure-docker` | Register the gcloud tool as a Docker credential helper. |
|
|
53
|
-
| gcal | `gcloud auth list` | List all credentialed accounts. |
|
|
54
|
-
| gcal | `gcloud auth login` | Authorize Google Cloud access for the gcloud tool with Google user credentials and set current account as active. |
|
|
55
|
-
| gcapat | `gcloud auth print-access-token` | Display the current account's access token. |
|
|
56
|
-
| gcar | `gcloud auth revoke` | Remove access credentials for an account. |
|
|
57
|
-
|
|
58
|
-
### 1.4 Aliases to configuring Cloud Identity & Access Management (IAM) preferences and service accounts
|
|
59
|
-
|
|
60
|
-
| Alias | Command | Description |
|
|
61
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
62
|
-
| gciamk | `gcloud iam service-accounts keys list` | List a service account's keys. |
|
|
63
|
-
| gciaml | `gcloud iam list-grantable-roles` | List IAM grantable roles for a resource. |
|
|
64
|
-
| gciamp | `gcloud iam service-accounts add-iam-policy-binding` | Add an IAM policy binding to a service account. |
|
|
65
|
-
| gciamr | `gcloud iam roles create` | Create a custom role for a project or org. |
|
|
66
|
-
| gciams | `gcloud iam service-accounts set-iam-policy` | Replace existing IAM policy binding. |
|
|
67
|
-
| gciamv | `gcloud iam service-accounts create` | Create a service account for a project. |
|
|
68
|
-
|
|
69
|
-
### 1.5 Aliases to manage project access policies
|
|
70
|
-
|
|
71
|
-
| Alias | Command | Description |
|
|
72
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
73
|
-
| gcpa | `gcloud projects add-iam-policy-binding` | Add an IAM policy binding to a specified project. |
|
|
74
|
-
| gcpd | `gcloud projects describe` | Display metadata for a project (including its ID). |
|
|
75
|
-
|
|
76
|
-
### 1.6 Aliases to manage containerized applications on Kubernetes
|
|
77
|
-
|
|
78
|
-
| Alias | Command | Description |
|
|
79
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
80
|
-
| gcccc | `gcloud container clusters create` | Create a cluster to run GKE containers. |
|
|
81
|
-
| gcccg | `gcloud container clusters get-credentials` | Update kubeconfig to get kubectl to use a GKE cluster. |
|
|
82
|
-
| gcccl | `gcloud container clusters list` | List clusters for running GKE containers. |
|
|
83
|
-
| gccil | `gcloud container images list-tags` | List tag and digest metadata for a container image. |
|
|
84
|
-
|
|
85
|
-
### 1.7 Aliases to create, run, and manage VMs on Google infrastructure
|
|
86
|
-
|
|
87
|
-
| Alias | Command | Description |
|
|
88
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
89
|
-
| gcpc | `gcloud compute copy-files` | Copy files |
|
|
90
|
-
| gcpdown | `gcloud compute instances stop` | Stop instance |
|
|
91
|
-
| gcpds | `gcloud compute disks snapshot` | Create snapshot of persistent disks. |
|
|
92
|
-
| gcpid | `gcloud compute instances describe` | Display a VM instance's details. |
|
|
93
|
-
| gcpil | `gcloud compute instances list` | List all VM instances in a project. |
|
|
94
|
-
| gcprm | `gcloud compute instances delete` | Delete instance |
|
|
95
|
-
| gcpsk | `gcloud compute snapshots delete` | Delete a snapshot. |
|
|
96
|
-
| gcpssh | `gcloud compute ssh` | Connect to a VM instance by using SSH. |
|
|
97
|
-
| gcpup | `gcloud compute instances start` | Start instance. |
|
|
98
|
-
| gcpzl | `gcloud compute zones list` | List Compute Engine zones. |
|
|
99
|
-
|
|
100
|
-
### 1.8 Aliases to build highly scalable applications on a fully managed serverless platform
|
|
101
|
-
|
|
102
|
-
| Alias | Command | Description |
|
|
103
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
104
|
-
| gcapb | `gcloud app browse` | Open the current app in a web browser. |
|
|
105
|
-
| gcapc | `gcloud app create` | Create an App Engine app within your current project. |
|
|
106
|
-
| gcapd | `gcloud app deploy` | Deploy your app's code and configuration to the App Engine server. |
|
|
107
|
-
| gcapl | `gcloud app logs read` | Display the latest App Engine app logs. |
|
|
108
|
-
| gcapv | `gcloud app versions list` | List all versions of all services deployed to the App Engine server. |
|
|
109
|
-
|
|
110
|
-
### 1.9 Aliases to commands that might come in handy
|
|
111
|
-
|
|
112
|
-
| Alias | Command | Description |
|
|
113
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
114
|
-
| gckmsd | `gcloud kms decrypt` | Decrypt ciphertext (to a plaintext file) using a Cloud Key Management Service (Cloud KMS) key. |
|
|
115
|
-
| gclll | `gcloud logging logs list` | List your project's logs. |
|
|
116
|
-
| gcsqlb | `gcloud sql backups describe` | Display info about a Cloud SQL instance backup. |
|
|
117
|
-
| gcsqle | `gcloud sql export sql` | Export data from a Cloud SQL instance to a SQL file. |
|