@sebastienrousseau/dotfiles 0.2.466 → 0.2.469
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/README.md +19 -15
- package/dist/Makefile +126 -43
- package/dist/bin/backup.js.map +1 -1
- package/dist/bin/constants.d.ts +2 -2
- package/dist/bin/constants.d.ts.map +1 -1
- package/dist/bin/constants.js +1 -1
- package/dist/bin/dotfiles.d.ts +2 -2
- package/dist/bin/dotfiles.d.ts.map +1 -1
- package/dist/bin/dotfiles.js +1 -2
- package/dist/bin/dotfiles.js.map +1 -1
- package/dist/bin/download.d.ts +2 -2
- package/dist/bin/download.d.ts.map +1 -1
- package/dist/bin/download.js +1 -2
- package/dist/bin/download.js.map +1 -1
- package/dist/bin/index.js +1 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/filesizes.txt +161 -161
- package/dist/lib/README.md +83 -5
- package/dist/lib/aliases/README.md +49 -43
- package/dist/lib/aliases/archives/README.md +126 -37
- package/dist/lib/aliases/archives/archives.aliases.sh +112 -152
- package/dist/lib/aliases/cd/README.md +138 -55
- package/dist/lib/aliases/cd/cd.aliases.sh +45 -33
- package/dist/lib/aliases/chmod/README.md +151 -96
- package/dist/lib/aliases/chmod/chmod.aliases.sh +103 -69
- package/dist/lib/aliases/clear/README.md +8 -4
- package/dist/lib/aliases/clear/clear.aliases.sh +57 -28
- package/dist/lib/aliases/configuration/README.md +8 -4
- package/dist/lib/aliases/configuration/configuration.aliases.sh +53 -30
- package/dist/lib/aliases/default/README.md +8 -4
- package/dist/lib/aliases/default/default.aliases.sh +99 -86
- package/dist/lib/aliases/dig/README.md +8 -4
- package/dist/lib/aliases/dig/dig.aliases.sh +4 -4
- package/dist/lib/aliases/disk-usage/README.md +8 -4
- package/dist/lib/aliases/disk-usage/du.aliases.sh +2 -2
- package/dist/lib/aliases/editor/README.md +8 -4
- package/dist/lib/aliases/editor/editor.aliases.sh +4 -4
- package/dist/lib/aliases/find/README.md +8 -4
- package/dist/lib/aliases/find/find.aliases.sh +4 -4
- package/dist/lib/aliases/gcloud/README.md +8 -4
- package/dist/lib/aliases/gcloud/gcloud.aliases.sh +4 -4
- package/dist/lib/aliases/git/README.md +8 -4
- package/dist/lib/aliases/git/git.aliases.sh +3 -3
- package/dist/lib/aliases/gnu/README.md +8 -4
- package/dist/lib/aliases/gnu/gnucoreutils-aliases.sh +2 -2
- package/dist/lib/aliases/heroku/README.md +8 -4
- package/dist/lib/aliases/heroku/heroku.aliases.sh +3 -3
- package/dist/lib/aliases/interactive/README.md +29 -17
- package/dist/lib/aliases/interactive/interactive.aliases.sh +15 -18
- package/dist/lib/aliases/list/README.md +118 -25
- package/dist/lib/aliases/list/list.aliases.sh +130 -84
- package/dist/lib/aliases/macOS/README.md +8 -4
- package/dist/lib/aliases/macOS/macos.aliases.sh +3 -3
- package/dist/lib/aliases/make/README.md +8 -4
- package/dist/lib/aliases/make/make.aliases.sh +3 -3
- package/dist/lib/aliases/mkdir/README.md +8 -4
- package/dist/lib/aliases/mkdir/mkdir.aliases.sh +3 -3
- package/dist/lib/aliases/npm/README.md +8 -4
- package/dist/lib/aliases/npm/npm.aliases.sh +3 -3
- package/dist/lib/aliases/permission/README.md +8 -4
- package/dist/lib/aliases/permission/permission.aliases.sh +3 -3
- package/dist/lib/aliases/pnpm/README.md +8 -4
- package/dist/lib/aliases/pnpm/pnpm.aliases.sh +3 -3
- package/dist/lib/aliases/ps/README.md +8 -4
- package/dist/lib/aliases/ps/ps.aliases.sh +3 -3
- package/dist/lib/aliases/python/python.aliases.sh +141 -0
- package/dist/lib/aliases/rsync/README.md +8 -4
- package/dist/lib/aliases/rsync/rsync.aliases.sh +3 -3
- package/dist/lib/aliases/rust/README.md +171 -46
- package/dist/lib/aliases/rust/rust.aliases.sh +109 -117
- package/dist/lib/aliases/subversion/README.md +8 -4
- package/dist/lib/aliases/subversion/subversion.aliases.sh +3 -3
- package/dist/lib/aliases/sudo/README.md +8 -4
- package/dist/lib/aliases/sudo/sudo.aliases.sh +3 -3
- package/dist/lib/aliases/tmux/README.md +8 -4
- package/dist/lib/aliases/tmux/tmux.aliases.sh +3 -3
- package/dist/lib/aliases/update/README.md +8 -4
- package/dist/lib/aliases/update/update.aliases.sh +307 -66
- package/dist/lib/aliases/uuid/README.md +8 -4
- package/dist/lib/aliases/uuid/uuid.aliases.sh +3 -3
- package/dist/lib/aliases/wget/README.md +8 -4
- package/dist/lib/aliases/wget/wget.aliases.sh +3 -3
- package/dist/lib/aliases.sh +42 -12
- package/dist/lib/configurations/README.md +8 -4
- package/dist/lib/configurations/bash/bashrc +163 -35
- package/dist/lib/configurations/curl/curlrc +3 -6
- package/dist/lib/configurations/default/color.sh +3 -3
- package/dist/lib/configurations/default/constants.sh +4 -4
- package/dist/lib/configurations/default/editor.sh +3 -3
- package/dist/lib/configurations/default/prompt.sh +20 -11
- package/dist/lib/configurations/input/inputrc +3 -3
- package/dist/lib/configurations/nano/nanorc +3 -3
- package/dist/lib/configurations/profile/profile +3 -3
- package/dist/lib/configurations/prompt/prompt.sh +81 -0
- package/dist/lib/configurations/tmux/default +3 -3
- package/dist/lib/configurations/tmux/display +3 -3
- package/dist/lib/configurations/tmux/linux +3 -3
- package/dist/lib/configurations/tmux/navigation +3 -3
- package/dist/lib/configurations/tmux/panes +3 -3
- package/dist/lib/configurations/tmux/theme +4 -4
- package/dist/lib/configurations/tmux/tmux +3 -3
- package/dist/lib/configurations/vim/vimrc +191 -71
- package/dist/lib/configurations/wget/wgetrc +3 -3
- package/dist/lib/configurations/zsh/zshrc +11 -12
- package/dist/lib/configurations.sh +39 -9
- package/dist/lib/functions/README.md +73 -55
- package/dist/lib/functions/apihealth.sh +277 -0
- package/dist/lib/functions/apilatency.sh +157 -0
- package/dist/lib/functions/apiload.sh +165 -0
- package/dist/lib/functions/backup.sh +143 -0
- package/dist/lib/functions/cdls.sh +52 -6
- package/dist/lib/functions/curlheader.sh +66 -10
- package/dist/lib/functions/curlstatus.sh +64 -7
- package/dist/lib/functions/curltime.sh +56 -14
- package/dist/lib/functions/encode64.sh +87 -7
- package/dist/lib/functions/environment.sh +65 -25
- package/dist/lib/functions/extract.sh +79 -27
- package/dist/lib/functions/freespace.sh +55 -9
- package/dist/lib/functions/genpwd.sh +93 -29
- package/dist/lib/functions/goto.sh +59 -8
- package/dist/lib/functions/hexdump.sh +96 -0
- package/dist/lib/functions/hiddenfiles.sh +77 -0
- package/dist/lib/functions/hostinfo.sh +92 -21
- package/dist/lib/functions/hstats.sh +69 -5
- package/dist/lib/functions/httpdebug.sh +109 -5
- package/dist/lib/functions/kebabcase.sh +61 -0
- package/dist/lib/functions/keygen.sh +188 -25
- package/dist/lib/functions/last.sh +106 -5
- package/dist/lib/functions/logout.sh +114 -6
- package/dist/lib/functions/lowercase.sh +49 -17
- package/dist/lib/functions/matrix.sh +205 -30
- package/dist/lib/functions/mount_read_only.sh +3 -3
- package/dist/lib/functions/myproc.sh +3 -3
- package/dist/lib/functions/prependpath.sh +3 -3
- package/dist/lib/functions/ql.sh +3 -3
- package/dist/lib/functions/rd.sh +3 -3
- package/dist/lib/functions/remove_disk.sh +3 -3
- package/dist/lib/functions/ren.sh +68 -8
- package/dist/lib/functions/sentencecase.sh +63 -0
- package/dist/lib/functions/showhiddenfiles.sh +3 -3
- package/dist/lib/functions/size.sh +6 -5
- package/dist/lib/functions/snakecase.sh +61 -0
- package/dist/lib/functions/stopwatch.sh +3 -3
- package/dist/lib/functions/sysinfo.sh +145 -0
- package/dist/lib/functions/titlecase.sh +65 -0
- package/dist/lib/functions/uppercase.sh +51 -19
- package/dist/lib/functions/view-source.sh +3 -3
- package/dist/lib/functions/vscode.sh +3 -3
- package/dist/lib/functions/whoisport.sh +3 -3
- package/dist/lib/functions/zipf.sh +3 -3
- package/dist/lib/functions.sh +41 -10
- package/dist/lib/history.sh +68 -83
- package/dist/lib/paths/README.md +52 -0
- package/dist/lib/paths/custom.paths.sh +40 -0
- package/dist/lib/paths/default.paths.sh +37 -0
- package/dist/lib/paths.sh +40 -11
- package/dist/scripts/backup.sh +3 -3
- package/dist/scripts/banner.sh +3 -3
- package/dist/scripts/build.sh +3 -3
- package/dist/scripts/clean.sh +3 -3
- package/dist/scripts/compile.sh +3 -3
- package/dist/scripts/copy.sh +3 -3
- package/dist/scripts/dotfiles.sh +3 -3
- package/dist/scripts/download.sh +3 -3
- package/dist/scripts/help.sh +3 -3
- package/dist/scripts/ssh.sh +3 -3
- package/dist/scripts/unpack.sh +3 -3
- package/package.json +10 -9
- package/dist/lib/aliases/jekyll/README.md +0 -37
- package/dist/lib/aliases/jekyll/jekyll.aliases.sh +0 -54
- package/dist/lib/configurations/tmux/vi +0 -9
- package/dist/lib/functions/filehead.sh +0 -4
- package/dist/lib/functions/hidehiddenfiles.sh +0 -14
- package/dist/lib/paths/ant/ant.paths.sh +0 -15
- package/dist/lib/paths/default/default.paths.sh +0 -19
- package/dist/lib/paths/homebrew/homebrew.paths.sh +0 -27
- package/dist/lib/paths/java/java.paths.sh +0 -19
- package/dist/lib/paths/maven/maven.paths.sh +0 -18
- package/dist/lib/paths/node/node.paths.sh +0 -15
- package/dist/lib/paths/nvm/nvm.paths.sh +0 -23
- package/dist/lib/paths/pnpm/pnpm.paths.sh +0 -15
- package/dist/lib/paths/python/python.paths.sh +0 -36
- package/dist/lib/paths/ruby/ruby.paths.sh +0 -25
- package/dist/lib/paths/tmux/tmux.paths.sh +0 -12
|
@@ -1,63 +1,146 @@
|
|
|
1
|
-
<!-- markdownlint-disable MD033 MD041 -->
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
alt="
|
|
5
|
-
|
|
1
|
+
<!-- markdownlint-disable MD033 MD041 MD043 -->
|
|
2
|
+
<img
|
|
3
|
+
src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
|
|
4
|
+
alt="Dotfiles logo"
|
|
5
|
+
width="66"
|
|
6
|
+
align="right"
|
|
7
|
+
/>
|
|
6
8
|
<!-- markdownlint-enable MD033 MD041 -->
|
|
7
9
|
|
|
8
|
-
# Dotfiles (v0.2.
|
|
10
|
+
# Dotfiles (v0.2.469)
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
Seamlessly enhance your shell environment 🐚
|
|
11
13
|
|
|
12
14
|
![Dotfiles banner][banner]
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🚀 Introduction
|
|
19
|
+
|
|
20
|
+
This repository includes a robust set of shell aliases and scripts designed to
|
|
21
|
+
streamline your command-line experience. The `cd` aliases script simplifies
|
|
22
|
+
filesystem navigation with:
|
|
23
|
+
|
|
24
|
+
- **Dynamic error handling**
|
|
25
|
+
- **Automatic directory listing**
|
|
26
|
+
- **Customizable paths for frequent directories**
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 🛠️ Features
|
|
31
|
+
|
|
32
|
+
### 🌟 Navigation Shortcuts
|
|
33
|
+
|
|
34
|
+
| Alias | Description |
|
|
35
|
+
|------------------|--------------------------------------|
|
|
36
|
+
| `-` | Switch to the previous directory |
|
|
37
|
+
| `..`, `...` | Ascend one or two levels in the tree |
|
|
38
|
+
| `....`, `.....` | Ascend three or four levels |
|
|
39
|
+
| `hom` | Navigate to the home directory (`~`) |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### 📂 Custom Directory Access
|
|
44
|
+
|
|
45
|
+
Quickly access frequently used directories with predefined shortcuts. You can
|
|
46
|
+
customize these paths to fit your needs:
|
|
47
|
+
|
|
48
|
+
| Alias | Directory Path | Description |
|
|
49
|
+
|-------|--------------------------|------------------------|
|
|
50
|
+
| `app` | `${HOME}/Applications` | Applications directory |
|
|
51
|
+
| `cod` | `${HOME}/Code` | Code directory |
|
|
52
|
+
| `des` | `${HOME}/Desktop` | Desktop directory |
|
|
53
|
+
| `doc` | `${HOME}/Documents` | Documents directory |
|
|
54
|
+
| `dot` | `${HOME}/.dotfiles` | Dotfiles directory |
|
|
55
|
+
| `dow` | `${HOME}/Downloads` | Downloads directory |
|
|
56
|
+
| `mus` | `${HOME}/Music` | Music directory |
|
|
57
|
+
| `pic` | `${HOME}/Pictures` | Pictures directory |
|
|
58
|
+
| `vid` | `${HOME}/Videos` | Videos directory |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### 🔧 System Directories
|
|
63
|
+
|
|
64
|
+
Effortlessly navigate to critical system directories:
|
|
65
|
+
|
|
66
|
+
| Alias | Directory Path | Description |
|
|
67
|
+
|-------|----------------|--------------------------------|
|
|
68
|
+
| `etc` | `/etc` | System configuration directory |
|
|
69
|
+
| `var` | `/var` | Variable files directory |
|
|
70
|
+
| `tmp` | `/tmp` | Temporary files directory |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### ⚙️ Enhanced Customization
|
|
75
|
+
|
|
76
|
+
- **Dynamic Directory Paths**: Customize aliases through environment variables
|
|
77
|
+
- **Error Handling**: Provides clear messages for invalid directories
|
|
78
|
+
- **Optional Directory Listing**: Automatically lists contents after navigation
|
|
79
|
+
- **Tab Completion**: Supports custom tab completion for aliases
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 📦 Installation
|
|
84
|
+
|
|
85
|
+
1. **Clone the repository**:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git clone https://github.com/sebastienrousseau/dotfiles.git
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
1. **Source the script in your shell configuration**:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
echo 'source /path/to/dotfiles/cd.sh' >> ~/.bashrc
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
1. **Reload your shell**:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
source ~/.bashrc
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 🧑💻 Usage
|
|
106
|
+
|
|
107
|
+
Here are some examples of how you can use the `cd` aliases:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Navigate to the Code directory
|
|
111
|
+
cod
|
|
112
|
+
|
|
113
|
+
# Ascend two levels in the directory tree
|
|
114
|
+
...
|
|
115
|
+
|
|
116
|
+
# Access the Documents directory
|
|
117
|
+
doc
|
|
118
|
+
|
|
119
|
+
# Navigate to the system configuration directory
|
|
120
|
+
etc
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 📚 Documentation
|
|
126
|
+
|
|
127
|
+
For advanced configuration and detailed usage examples, visit the
|
|
128
|
+
[official documentation](https://dotfiles.io).
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 🛡️ License
|
|
133
|
+
|
|
134
|
+
This project is licensed under the
|
|
135
|
+
[MIT License](https://opensource.org/licenses/MIT).
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 👨💻 Author
|
|
140
|
+
|
|
141
|
+
Created with ♥ by [Sebastien Rousseau](https://sebastienrousseau.com)
|
|
142
|
+
|
|
143
|
+
- Website: [https://sebastienrousseau.com](https://sebastienrousseau.com)
|
|
144
|
+
- GitHub: [https://github.com/sebastienrousseau](https://github.com/sebastienrousseau)
|
|
62
145
|
|
|
63
146
|
[banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg
|
|
@@ -1,39 +1,51 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
#
|
|
4
|
-
#
|
|
2
|
+
################################################################################
|
|
3
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 - Change directory aliases
|
|
4
|
+
# Made with ♥ by Sebastien Rousseau
|
|
5
5
|
# License: MIT
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
# Website: https://dotfiles.io
|
|
6
|
+
# This script provides aliases to quickly change directories.
|
|
7
|
+
################################################################################
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
#-----------------------------------------------------------------------------
|
|
10
|
+
# Frequently Used Directory Variables
|
|
11
|
+
#-----------------------------------------------------------------------------
|
|
12
|
+
HOME_DIR="${HOME}"
|
|
13
|
+
APP_DIR="${HOME}/Applications"
|
|
14
|
+
CODE_DIR="${HOME}/Code"
|
|
15
|
+
DESK_DIR="${HOME}/Desktop"
|
|
16
|
+
DOCS_DIR="${HOME}/Documents"
|
|
17
|
+
DOTF_DIR="${HOME}/.dotfiles"
|
|
18
|
+
DOWN_DIR="${HOME}/Downloads"
|
|
19
|
+
MUSIC_DIR="${HOME}/Music"
|
|
20
|
+
PICS_DIR="${HOME}/Pictures"
|
|
21
|
+
VIDS_DIR="${HOME}/Videos"
|
|
11
22
|
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
#-----------------------------------------------------------------------------
|
|
24
|
+
# Parent Directory Shortcuts
|
|
25
|
+
#-----------------------------------------------------------------------------
|
|
26
|
+
alias -- -='cd -' # Go to the previous directory
|
|
27
|
+
alias ..='cd ..' # Go up one level
|
|
28
|
+
alias ...='cd ../..' # Go up two levels
|
|
29
|
+
alias ....='cd ../../..' # Go up three levels
|
|
30
|
+
alias .....='cd ../../../..' # Go up four levels
|
|
14
31
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
alias
|
|
19
|
-
alias
|
|
32
|
+
#-----------------------------------------------------------------------------
|
|
33
|
+
# Home and Frequently Used Directories
|
|
34
|
+
#-----------------------------------------------------------------------------
|
|
35
|
+
alias app="cd ${APP_DIR} && ls -lh --group-directories-first" # Applications
|
|
36
|
+
alias cod="cd ${CODE_DIR} && ls -lh --group-directories-first" # Code
|
|
37
|
+
alias des="cd ${DESK_DIR} && ls -lh --group-directories-first" # Desktop
|
|
38
|
+
alias doc="cd ${DOCS_DIR} && ls -lh --group-directories-first" # Documents
|
|
39
|
+
alias dot="cd ${DOTF_DIR} && ls -lh --group-directories-first" # Dotfiles
|
|
40
|
+
alias dow="cd ${DOWN_DIR} && ls -lh --group-directories-first" # Downloads
|
|
41
|
+
alias hom="cd ${HOME_DIR} && ls -lh --group-directories-first" # Home Directory
|
|
42
|
+
alias mus="cd ${MUSIC_DIR} && ls -lh --group-directories-first" # Music
|
|
43
|
+
alias pic="cd ${PICS_DIR} && ls -lh --group-directories-first" # Pictures
|
|
44
|
+
alias vid="cd ${VIDS_DIR} && ls -lh --group-directories-first" # Videos
|
|
20
45
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
alias des='cd "${HOME}/Desktop"; ls' # des: Shortcut to go to the Desktop directory and list its contents.
|
|
28
|
-
alias doc='cd "${HOME}/Documents"; ls' # doc: Shortcut to go to the Documents directory and list its contents.
|
|
29
|
-
alias dot='cd "${HOME}/.dotfiles"; ls' # dot: Shortcut to go to the .dotfiles directory and list its contents.
|
|
30
|
-
alias dow='cd "${HOME}/Downloads"; ls' # dow: Shortcut to go to the Downloads directory and list its contents.
|
|
31
|
-
alias hom='cd "${HOME}"; ls' # hom: Shortcut to go to the home directory and list its contents.
|
|
32
|
-
alias mus='cd "${HOME}/Music"; ls' # mus: Shortcut to go to the Music directory and list its contents.
|
|
33
|
-
alias pic='cd "${HOME}/Pictures"; ls' # pic: Shortcut to go to the Pictures directory and list its contents.
|
|
34
|
-
alias vid='cd "${HOME}/Videos"; ls' # vid: Shortcut to go to the Videos directory and list its contents.
|
|
35
|
-
|
|
36
|
-
# Shortcuts to navigate to system directories
|
|
37
|
-
alias etc='cd /etc; ls' # etc: Shortcut to go to the etc directory and list its contents.
|
|
38
|
-
alias var='cd /var; ls' # var: Shortcut to go to the var directory and list its contents.
|
|
39
|
-
alias tmp='cd /tmp; ls' # tmp: Shortcut to go to the tmp directory and list its contents.
|
|
46
|
+
#-----------------------------------------------------------------------------
|
|
47
|
+
# System Directories
|
|
48
|
+
#-----------------------------------------------------------------------------
|
|
49
|
+
[[ -d "/etc" ]] && alias etc="cd /etc && ls -lh --group-directories-first" # System configuration
|
|
50
|
+
[[ -d "/var" ]] && alias var="cd /var && ls -lh --group-directories-first" # Variable data
|
|
51
|
+
[[ -d "/tmp" ]] && alias tmp="cd /tmp && ls -lh --group-directories-first" # Temporary files
|
|
@@ -1,105 +1,160 @@
|
|
|
1
|
-
<!-- markdownlint-disable MD033 MD041 -->
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
alt="
|
|
5
|
-
|
|
1
|
+
<!-- markdownlint-disable MD033 MD041 MD043 -->
|
|
2
|
+
<img
|
|
3
|
+
src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
|
|
4
|
+
alt="Dotfiles logo"
|
|
5
|
+
width="66"
|
|
6
|
+
align="right"
|
|
7
|
+
/>
|
|
6
8
|
<!-- markdownlint-enable MD033 MD041 -->
|
|
7
9
|
|
|
8
|
-
# Dotfiles (v0.2.
|
|
10
|
+
# Dotfiles (v0.2.469)
|
|
9
11
|
|
|
10
12
|
Simply designed to fit your shell life 🐚
|
|
11
13
|
|
|
12
14
|
![Dotfiles banner][banner]
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🚀 Introduction
|
|
19
|
+
|
|
20
|
+
This script provides an enhanced set of shortcuts and functions for the
|
|
21
|
+
`chmod` command, making it easier to manage file and directory permissions.
|
|
22
|
+
With features like input validation, recursive confirmation, and user-friendly
|
|
23
|
+
aliases, you can efficiently customize permissions for files and directories.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 🛠️ Features
|
|
28
|
+
|
|
29
|
+
### 🌟 Permission Aliases
|
|
30
|
+
|
|
31
|
+
Quickly apply common permission settings with pre-defined aliases:
|
|
32
|
+
|
|
33
|
+
| Alias | Permissions | Description |
|
|
34
|
+
|--------------|------------------|-------------------------------------------|
|
|
35
|
+
| `chmod_000` | `----------` | No permissions for anyone |
|
|
36
|
+
| `chmod_400` | `r--------` | Read-only for the owner |
|
|
37
|
+
| `chmod_444` | `r--r--r--` | Read-only for everyone |
|
|
38
|
+
| `chmod_600` | `rw-------` | Read/write for the owner |
|
|
39
|
+
| `chmod_644` | `rw-r--r--` | Read/write for the owner, read-only other |
|
|
40
|
+
| `chmod_666` | `rw-rw-rw-` | Read/write for everyone |
|
|
41
|
+
| `chmod_755` | `rwxr-xr-x` | Full owner, read/execute for others |
|
|
42
|
+
| `chmod_764` | `rwxrw-r--` | Full owner, read/write for the group, |
|
|
43
|
+
| `chmod_777` | `rwxrwxrwx` | Full permissions for everyone |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### 🔧 Recursive Confirmation for Permissions
|
|
48
|
+
|
|
49
|
+
The `change_permission` function allows you to recursively apply permissions
|
|
50
|
+
with a confirmation prompt, displaying the number of items affected:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
change_permission 755 /path/to/directory -R
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### 📂 User, Group, and Others Shortcuts
|
|
59
|
+
|
|
60
|
+
Fine-tune permissions for specific user groups (owner, group, or others):
|
|
61
|
+
|
|
62
|
+
| Alias | Description |
|
|
63
|
+
|---------------|--------------------------------------------|
|
|
64
|
+
| `chmod_u+x` | Add execute permission for the owner |
|
|
65
|
+
| `chmod_u-x` | Remove execute permission for the owner |
|
|
66
|
+
| `chmod_u+w` | Add write permission for the owner |
|
|
67
|
+
| `chmod_u-w` | Remove write permission for the owner |
|
|
68
|
+
| `chmod_u+r` | Add read permission for the owner |
|
|
69
|
+
| `chmod_u-r` | Remove read permission for the owner |
|
|
70
|
+
| `chmod_g+x` | Add execute permission for the group |
|
|
71
|
+
| `chmod_g-x` | Remove execute permission for the group |
|
|
72
|
+
| `chmod_g+w` | Add write permission for the group |
|
|
73
|
+
| `chmod_g-w` | Remove write permission for the group |
|
|
74
|
+
| `chmod_g+r` | Add read permission for the group |
|
|
75
|
+
| `chmod_g-r` | Remove read permission for the group |
|
|
76
|
+
| `chmod_o+x` | Add execute permission for others |
|
|
77
|
+
| `chmod_o-x` | Remove execute permission for others |
|
|
78
|
+
| `chmod_o+w` | Add write permission for others |
|
|
79
|
+
| `chmod_o-w` | Remove write permission for others |
|
|
80
|
+
| `chmod_o+r` | Add read permission for others |
|
|
81
|
+
| `chmod_o-r` | Remove read permission for others |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### 📄 Custom Aliases for File Types
|
|
86
|
+
|
|
87
|
+
Set permissions for specific file types with ease:
|
|
88
|
+
|
|
89
|
+
| Alias | Description |
|
|
90
|
+
|--------------|----------------------------------------------------|
|
|
91
|
+
| `chmod_755d` | Set permissions of all directories to `rwxr-xr-x` |
|
|
92
|
+
| `chmod_644f` | Set permissions of all files to `rw-r--r--` |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 📦 Installation
|
|
97
|
+
|
|
98
|
+
1. Clone this repository:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
git clone https://github.com/sebastienrousseau/dotfiles.git
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
2. Source the script in your shell configuration file:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
echo 'source /path/to/dotfiles/chmod.sh' >> ~/.bashrc
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. Reload your shell:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
source ~/.bashrc
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 🧑💻 Usage
|
|
119
|
+
|
|
120
|
+
Here are some examples of how to use the `chmod` aliases and functions:
|
|
121
|
+
|
|
122
|
+
- Apply common permissions:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
chmod_644 /path/to/file
|
|
126
|
+
chmod_755 /path/to/directory
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- Modify user, group, or others' permissions:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
chmod_u+x /path/to/script
|
|
133
|
+
chmod_g-w /path/to/file
|
|
134
|
+
chmod_o+r /path/to/file
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- Recursively set permissions with confirmation:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
change_permission 755 /path/to/directory -R
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 🛡️ License
|
|
146
|
+
|
|
147
|
+
This project is licensed under the
|
|
148
|
+
[MIT License](https://opensource.org/licenses/MIT). See the `LICENSE` file for
|
|
149
|
+
more information.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 👨💻 Author
|
|
154
|
+
|
|
155
|
+
Created with ♥ by [Sebastien Rousseau](https://sebastienrousseau.com)
|
|
156
|
+
|
|
157
|
+
- Website: [https://sebastienrousseau.com](https://sebastienrousseau.com)
|
|
158
|
+
- GitHub: [https://github.com/sebastienrousseau](https://github.com/sebastienrousseau)
|
|
104
159
|
|
|
105
160
|
[banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg
|