@sebastienrousseau/dotfiles 0.2.469 → 0.2.499

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.
Files changed (221) hide show
  1. package/docs/ARCHITECTURE.md +62 -0
  2. package/docs/COMPLIANCE.md +47 -0
  3. package/docs/COPYRIGHT +6 -0
  4. package/docs/OPERATIONS.md +103 -0
  5. package/docs/PLAN.md +161 -0
  6. package/docs/PR_DESCRIPTION.md +150 -0
  7. package/docs/ROADMAP.md +148 -0
  8. package/docs/ROADMAP_legacy.md +556 -0
  9. package/docs/SECURITY_CHECKLIST.md +25 -0
  10. package/docs/TASK.md +99 -0
  11. package/docs/WALKTHROUGH.md +46 -0
  12. package/package.json +64 -76
  13. package/scripts/backup.sh +142 -0
  14. package/{dist/scripts → scripts}/banner.sh +1 -1
  15. package/scripts/benchmark.sh +20 -0
  16. package/{dist/scripts → scripts}/build.sh +1 -1
  17. package/{dist/scripts → scripts}/clean.sh +1 -1
  18. package/{dist/scripts → scripts}/compile.sh +1 -1
  19. package/{dist/scripts → scripts}/copy.sh +1 -1
  20. package/scripts/detect-collisions.py +84 -0
  21. package/scripts/doctor.sh +79 -0
  22. package/{dist/scripts → scripts}/dotfiles.sh +1 -1
  23. package/{dist/scripts → scripts}/download.sh +1 -1
  24. package/{dist/scripts → scripts}/help.sh +1 -1
  25. package/scripts/lock-configs.sh +57 -0
  26. package/scripts/package.sh +46 -0
  27. package/{dist/scripts → scripts}/ssh.sh +1 -1
  28. package/scripts/teleport.sh +23 -0
  29. package/scripts/test-aliases.sh +25 -0
  30. package/scripts/test_smoke.sh +88 -0
  31. package/{dist/scripts → scripts}/unpack.sh +1 -1
  32. package/scripts/verify_state.sh +60 -0
  33. package/templates/projects/go/README.md +3 -0
  34. package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +7 -0
  35. package/templates/projects/go/go.mod +3 -0
  36. package/templates/projects/node/README.md +3 -0
  37. package/templates/projects/node/package.json +10 -0
  38. package/templates/projects/node/src/index.js +2 -0
  39. package/templates/projects/python/README.md +3 -0
  40. package/templates/projects/python/pyproject.toml +10 -0
  41. package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +1 -0
  42. package/templates/projects/python/tests/test_basic.py +2 -0
  43. package/LICENSE +0 -1283
  44. package/README.md +0 -398
  45. package/dist/Makefile +0 -140
  46. package/dist/bin/backup.d.ts +0 -3
  47. package/dist/bin/backup.d.ts.map +0 -1
  48. package/dist/bin/backup.js +0 -4
  49. package/dist/bin/backup.js.map +0 -1
  50. package/dist/bin/constants.d.ts +0 -7
  51. package/dist/bin/constants.d.ts.map +0 -1
  52. package/dist/bin/constants.js +0 -2
  53. package/dist/bin/constants.js.map +0 -1
  54. package/dist/bin/copy.d.ts +0 -3
  55. package/dist/bin/copy.d.ts.map +0 -1
  56. package/dist/bin/copy.js +0 -3
  57. package/dist/bin/copy.js.map +0 -1
  58. package/dist/bin/dotfiles.d.ts +0 -3
  59. package/dist/bin/dotfiles.d.ts.map +0 -1
  60. package/dist/bin/dotfiles.js +0 -2
  61. package/dist/bin/dotfiles.js.map +0 -1
  62. package/dist/bin/download.d.ts +0 -3
  63. package/dist/bin/download.d.ts.map +0 -1
  64. package/dist/bin/download.js +0 -2
  65. package/dist/bin/download.js.map +0 -1
  66. package/dist/bin/index.d.ts +0 -2
  67. package/dist/bin/index.d.ts.map +0 -1
  68. package/dist/bin/index.js +0 -1
  69. package/dist/bin/index.js.map +0 -1
  70. package/dist/bin/transfer.d.ts +0 -3
  71. package/dist/bin/transfer.d.ts.map +0 -1
  72. package/dist/bin/transfer.js +0 -4
  73. package/dist/bin/transfer.js.map +0 -1
  74. package/dist/bin/unpack.d.ts +0 -3
  75. package/dist/bin/unpack.d.ts.map +0 -1
  76. package/dist/bin/unpack.js +0 -3
  77. package/dist/bin/unpack.js.map +0 -1
  78. package/dist/filesizes.txt +0 -382
  79. package/dist/lib/README.md +0 -86
  80. package/dist/lib/aliases/README.md +0 -57
  81. package/dist/lib/aliases/archives/README.md +0 -145
  82. package/dist/lib/aliases/archives/archives.aliases.sh +0 -114
  83. package/dist/lib/aliases/cd/README.md +0 -146
  84. package/dist/lib/aliases/cd/cd.aliases.sh +0 -51
  85. package/dist/lib/aliases/chmod/README.md +0 -160
  86. package/dist/lib/aliases/chmod/chmod.aliases.sh +0 -107
  87. package/dist/lib/aliases/clear/README.md +0 -37
  88. package/dist/lib/aliases/clear/clear.aliases.sh +0 -71
  89. package/dist/lib/aliases/configuration/README.md +0 -39
  90. package/dist/lib/aliases/configuration/configuration.aliases.sh +0 -70
  91. package/dist/lib/aliases/default/README.md +0 -40
  92. package/dist/lib/aliases/default/default.aliases.sh +0 -139
  93. package/dist/lib/aliases/dig/README.md +0 -37
  94. package/dist/lib/aliases/dig/dig.aliases.sh +0 -43
  95. package/dist/lib/aliases/disk-usage/README.md +0 -36
  96. package/dist/lib/aliases/disk-usage/du.aliases.sh +0 -84
  97. package/dist/lib/aliases/editor/README.md +0 -53
  98. package/dist/lib/aliases/editor/editor.aliases.sh +0 -26
  99. package/dist/lib/aliases/find/README.md +0 -46
  100. package/dist/lib/aliases/find/find.aliases.sh +0 -60
  101. package/dist/lib/aliases/gcloud/README.md +0 -63
  102. package/dist/lib/aliases/gcloud/gcloud.aliases.sh +0 -335
  103. package/dist/lib/aliases/git/README.md +0 -153
  104. package/dist/lib/aliases/git/git.aliases.sh +0 -544
  105. package/dist/lib/aliases/gnu/README.md +0 -89
  106. package/dist/lib/aliases/gnu/gnucoreutils-aliases.sh +0 -150
  107. package/dist/lib/aliases/heroku/README.md +0 -430
  108. package/dist/lib/aliases/heroku/heroku.aliases.sh +0 -1053
  109. package/dist/lib/aliases/interactive/README.md +0 -55
  110. package/dist/lib/aliases/interactive/interactive.aliases.sh +0 -50
  111. package/dist/lib/aliases/list/README.md +0 -131
  112. package/dist/lib/aliases/list/list.aliases.sh +0 -132
  113. package/dist/lib/aliases/macOS/README.md +0 -42
  114. package/dist/lib/aliases/macOS/macos.aliases.sh +0 -65
  115. package/dist/lib/aliases/make/README.md +0 -32
  116. package/dist/lib/aliases/make/make.aliases.sh +0 -35
  117. package/dist/lib/aliases/mkdir/README.md +0 -30
  118. package/dist/lib/aliases/mkdir/mkdir.aliases.sh +0 -29
  119. package/dist/lib/aliases/npm/README.md +0 -41
  120. package/dist/lib/aliases/npm/npm.aliases.sh +0 -61
  121. package/dist/lib/aliases/permission/README.md +0 -47
  122. package/dist/lib/aliases/permission/permission.aliases.sh +0 -73
  123. package/dist/lib/aliases/pnpm/README.md +0 -53
  124. package/dist/lib/aliases/pnpm/pnpm.aliases.sh +0 -76
  125. package/dist/lib/aliases/ps/README.md +0 -29
  126. package/dist/lib/aliases/ps/ps.aliases.sh +0 -20
  127. package/dist/lib/aliases/python/python.aliases.sh +0 -141
  128. package/dist/lib/aliases/rsync/README.md +0 -25
  129. package/dist/lib/aliases/rsync/rsync.aliases.sh +0 -17
  130. package/dist/lib/aliases/rust/README.md +0 -182
  131. package/dist/lib/aliases/rust/rust.aliases.sh +0 -119
  132. package/dist/lib/aliases/subversion/README.md +0 -66
  133. package/dist/lib/aliases/subversion/subversion.aliases.sh +0 -47
  134. package/dist/lib/aliases/sudo/README.md +0 -27
  135. package/dist/lib/aliases/sudo/sudo.aliases.sh +0 -20
  136. package/dist/lib/aliases/tmux/README.md +0 -31
  137. package/dist/lib/aliases/tmux/tmux.aliases.sh +0 -36
  138. package/dist/lib/aliases/update/README.md +0 -38
  139. package/dist/lib/aliases/update/update.aliases.sh +0 -310
  140. package/dist/lib/aliases/uuid/README.md +0 -24
  141. package/dist/lib/aliases/uuid/uuid.aliases.sh +0 -19
  142. package/dist/lib/aliases/wget/README.md +0 -27
  143. package/dist/lib/aliases/wget/wget.aliases.sh +0 -22
  144. package/dist/lib/aliases.sh +0 -50
  145. package/dist/lib/configurations/README.md +0 -18
  146. package/dist/lib/configurations/bash/bashrc +0 -167
  147. package/dist/lib/configurations/curl/cacert.pem +0 -3460
  148. package/dist/lib/configurations/curl/curlrc +0 -53
  149. package/dist/lib/configurations/default/color.sh +0 -24
  150. package/dist/lib/configurations/default/constants.sh +0 -43
  151. package/dist/lib/configurations/default/editor.sh +0 -18
  152. package/dist/lib/configurations/default/prompt.sh +0 -48
  153. package/dist/lib/configurations/gem/gemrc +0 -9
  154. package/dist/lib/configurations/input/inputrc +0 -23
  155. package/dist/lib/configurations/jshint/jshintrc +0 -37
  156. package/dist/lib/configurations/nano/nanorc +0 -35
  157. package/dist/lib/configurations/profile/profile +0 -37
  158. package/dist/lib/configurations/prompt/prompt.sh +0 -81
  159. package/dist/lib/configurations/tmux/default +0 -18
  160. package/dist/lib/configurations/tmux/display +0 -30
  161. package/dist/lib/configurations/tmux/linux +0 -18
  162. package/dist/lib/configurations/tmux/navigation +0 -30
  163. package/dist/lib/configurations/tmux/panes +0 -10
  164. package/dist/lib/configurations/tmux/theme +0 -29
  165. package/dist/lib/configurations/tmux/tmux +0 -21
  166. package/dist/lib/configurations/vim/vimrc +0 -193
  167. package/dist/lib/configurations/wget/wgetrc +0 -40
  168. package/dist/lib/configurations/zsh/zshrc +0 -50
  169. package/dist/lib/configurations.sh +0 -45
  170. package/dist/lib/functions/README.md +0 -92
  171. package/dist/lib/functions/apihealth.sh +0 -277
  172. package/dist/lib/functions/apilatency.sh +0 -157
  173. package/dist/lib/functions/apiload.sh +0 -165
  174. package/dist/lib/functions/backup.sh +0 -143
  175. package/dist/lib/functions/cdls.sh +0 -60
  176. package/dist/lib/functions/curlheader.sh +0 -78
  177. package/dist/lib/functions/curlstatus.sh +0 -74
  178. package/dist/lib/functions/curltime.sh +0 -75
  179. package/dist/lib/functions/encode64.sh +0 -107
  180. package/dist/lib/functions/environment.sh +0 -78
  181. package/dist/lib/functions/extract.sh +0 -86
  182. package/dist/lib/functions/freespace.sh +0 -67
  183. package/dist/lib/functions/genpwd.sh +0 -105
  184. package/dist/lib/functions/goto.sh +0 -67
  185. package/dist/lib/functions/hexdump.sh +0 -96
  186. package/dist/lib/functions/hiddenfiles.sh +0 -77
  187. package/dist/lib/functions/hostinfo.sh +0 -98
  188. package/dist/lib/functions/hstats.sh +0 -75
  189. package/dist/lib/functions/httpdebug.sh +0 -113
  190. package/dist/lib/functions/kebabcase.sh +0 -61
  191. package/dist/lib/functions/keygen.sh +0 -194
  192. package/dist/lib/functions/last.sh +0 -112
  193. package/dist/lib/functions/logout.sh +0 -120
  194. package/dist/lib/functions/lowercase.sh +0 -61
  195. package/dist/lib/functions/matrix.sh +0 -216
  196. package/dist/lib/functions/mount_read_only.sh +0 -11
  197. package/dist/lib/functions/myproc.sh +0 -9
  198. package/dist/lib/functions/prependpath.sh +0 -21
  199. package/dist/lib/functions/ql.sh +0 -9
  200. package/dist/lib/functions/rd.sh +0 -17
  201. package/dist/lib/functions/remove_disk.sh +0 -11
  202. package/dist/lib/functions/ren.sh +0 -73
  203. package/dist/lib/functions/sentencecase.sh +0 -63
  204. package/dist/lib/functions/showhiddenfiles.sh +0 -14
  205. package/dist/lib/functions/size.sh +0 -16
  206. package/dist/lib/functions/snakecase.sh +0 -61
  207. package/dist/lib/functions/stopwatch.sh +0 -15
  208. package/dist/lib/functions/sysinfo.sh +0 -145
  209. package/dist/lib/functions/titlecase.sh +0 -65
  210. package/dist/lib/functions/uppercase.sh +0 -61
  211. package/dist/lib/functions/view-source.sh +0 -9
  212. package/dist/lib/functions/vscode.sh +0 -32
  213. package/dist/lib/functions/whoisport.sh +0 -14
  214. package/dist/lib/functions/zipf.sh +0 -16
  215. package/dist/lib/functions.sh +0 -46
  216. package/dist/lib/history.sh +0 -90
  217. package/dist/lib/paths/README.md +0 -52
  218. package/dist/lib/paths/custom.paths.sh +0 -40
  219. package/dist/lib/paths/default.paths.sh +0 -37
  220. package/dist/lib/paths.sh +0 -46
  221. package/dist/scripts/backup.sh +0 -95
@@ -1,57 +0,0 @@
1
- <img
2
- src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
3
- alt="dotfiles logo"
4
- width="66"
5
- align="right"
6
- />
7
-
8
- # Dotfiles (v0.2.469)
9
-
10
- Simply designed to fit your shell life 🐚
11
-
12
- ![Dotfiles banner][banner]
13
-
14
- This repository contains a structured set of directories and scripts to manage various shell configurations, aliases, and utilities. Below is the organized directory structure with detailed descriptions.
15
-
16
- ## 🔧 Directory List
17
-
18
- <!-- markdownlint-disable MD013-->
19
-
20
- | Directory | Description | Link |
21
- | :-------------- | :----------------------------------------------- | :------------------------ |
22
- | `archives` | Compress and extract files and directories. | [View README](archives/README.md) |
23
- | `cd` | Navigate the file system. | [View README](cd/README.md) |
24
- | `chmod` | Change file and directory permissions. | [View README](chmod/README.md) |
25
- | `clear` | Clear the terminal screen. | [View README](clear/README.md) |
26
- | `configuration` | Manage dotfiles and shell configurations. | [View README](configuration/README.md) |
27
- | `default` | Set up default shell aliases and configurations. | [View README](default/README.md) |
28
- | `dig` | Query DNS name servers. | [View README](dig/README.md) |
29
- | `disk-usage` | Display disk usage information. | [View README](disk-usage/README.md) |
30
- | `editor` | Configure default text editors. | [View README](editor/README.md) |
31
- | `find` | Search files and directories using `find`. | [View README](find/README.md) |
32
- | `gcloud` | Manage Google Cloud SDK tools. | [View README](gcloud/README.md) |
33
- | `git` | Manage Git aliases and configurations. | [View README](git/README.md) |
34
- | `gnu` | Manage GNU core utilities. | [View README](gnu/README.md) |
35
- | `heroku` | Manage Heroku CLI. | [View README](heroku/README.md) |
36
- | `interactive` | Configure interactive shell behavior. | [View README](interactive/README.md) |
37
- | `list` | List files and directories. | [View README](list/README.md) |
38
- | `macOS` | Manage macOS-specific shell settings. | [View README](macOS/README.md) |
39
- | `make` | Manage GNU Make aliases and utilities. | [View README](make/README.md) |
40
- | `mkdir` | Create directories with custom options. | [View README](mkdir/README.md) |
41
- | `npm` | Manage Node.js package manager aliases. | [View README](npm/README.md) |
42
- | `permission` | Configure file and directory permissions. | [View README](permission/README.md) |
43
- | `pnpm` | Manage pnpm package manager aliases. | [View README](pnpm/README.md) |
44
- | `ps` | Manage process status commands. | [View README](ps/README.md) |
45
- | `python` | Configure Python aliases and utilities. | [View README](python/README.md) |
46
- | `rsync` | Configure rsync for efficient file transfers. | [View README](rsync/README.md) |
47
- | `rust` | Manage Rust programming tools and configurations.| [View README](rust/README.md) |
48
- | `subversion` | Configure Subversion (SVN) version control. | [View README](subversion/README.md) |
49
- | `sudo` | Manage superuser operations. | [View README](sudo/README.md) |
50
- | `tmux` | Configure tmux terminal multiplexer. | [View README](tmux/README.md) |
51
- | `update` | Update dotfiles and related configurations. | [View README](update/README.md) |
52
- | `uuid` | Generate UUIDs for various use cases. | [View README](uuid/README.md) |
53
- | `wget` | Manage wget command-line tool. | [View README](wget/README.md) |
54
-
55
- <!-- markdownlint-enable MD013-->
56
-
57
- [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg
@@ -1,145 +0,0 @@
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
- />
8
- <!-- markdownlint-enable MD033 MD041 -->
9
-
10
- # Dotfiles (v0.2.469)
11
-
12
- Simply designed to fit your shell life 🐚
13
-
14
- ![Dotfiles banner][banner]
15
-
16
- ## 🅰🆁🅲🅷🅸🆅🅴 🅰🅽🅳 🅲🅾🅼🅿🆁🅴🆂🆂🅸🅾🅽 🅰🅻🅸🅰🆂🅴🆂
17
-
18
- This module provides comprehensive tools for handling various archive and
19
- compression formats.
20
-
21
- ### Universal Extract Function
22
-
23
- The `extract` command automatically handles various archive formats:
24
-
25
- ```bash
26
- extract archive.tar.gz # Automatically detects format and extracts
27
- ```
28
-
29
- Supported formats:
30
-
31
- - `.tar.bz2`, `.tbz2`
32
- - `.tar.gz`, `.tgz`
33
- - `.tar.xz`
34
- - `.tar.zst`
35
- - `.tar`
36
- - `.bz2`
37
- - `.gz`
38
- - `.rar`
39
- - `.zip`
40
- - `.Z`
41
- - `.7z`
42
- - `.zst`
43
- - `.xz`
44
- - `.lz4`
45
-
46
- ### Large File Compression
47
-
48
- The `compress_large` function handles large file compression with streaming:
49
-
50
- ```bash
51
- compress_large gz largefile.dat # Creates largefile.dat.gz
52
- compress_large xz data.bin output.xz # Specific output name
53
- ```
54
-
55
- Supported formats: `gz`, `bz2`, `xz`, `zst`, `lz4`
56
-
57
- ### Archive Tools
58
-
59
- #### 7-Zip Aliases
60
-
61
- - `a7z` - Create 7z archive
62
- - `x7z` - Extract 7z archive
63
- - `l7z` - List contents
64
- - `t7z` - Test integrity
65
-
66
- #### Tar Aliases
67
-
68
- - `ctar` - Create tar archive
69
- - `xtar` - Extract tar archive
70
- - `ltar` - List contents
71
- - `ctgz` - Create tar.gz archive
72
- - `xtgz` - Extract tar.gz archive
73
- - `ctbz` - Create tar.bz2 archive
74
- - `xtbz` - Extract tar.bz2 archive
75
- - `ctxz` - Create tar.xz archive
76
- - `xtxz` - Extract tar.xz archive
77
- - `ctzst` - Create tar.zst archive
78
- - `xtzst` - Extract tar.zst archive
79
-
80
- #### Zip Aliases
81
-
82
- - `czip` - Create zip archive
83
- - `xzip` - Extract zip archive
84
- - `lzip` - List contents
85
-
86
- ### Compression Tools
87
-
88
- #### Gzip
89
-
90
- - `cgz` - Compress with gzip
91
- - `xgz` - Extract gzip
92
-
93
- #### Bzip2
94
-
95
- - `cbz` - Compress with bzip2
96
- - `xbz` - Extract bzip2
97
-
98
- #### XZ
99
-
100
- - `cxz` - Compress with xz
101
- - `xxz` - Extract xz
102
-
103
- #### Zstandard
104
-
105
- - `czst` - Compress with zstd
106
- - `xzst` - Extract zstd
107
-
108
- #### LZ4
109
-
110
- - `clz4` - Compress with lz4
111
- - `xlz4` - Extract lz4
112
-
113
- ### Features
114
-
115
- - Automatic format detection
116
- - Tab completion for the extract command
117
- - Error handling with helpful messages
118
- - Large file support with streaming
119
- - Archive integrity checking
120
- - Content listing
121
- - Cross-platform compatibility
122
-
123
- ### Usage Examples
124
-
125
- ```bash
126
- # Extract any supported archive
127
- extract archive.tar.gz
128
-
129
- # Create a tar.gz archive
130
- ctgz output.tar.gz folder/
131
-
132
- # List contents of a zip file
133
- lzip archive.zip
134
-
135
- # Compress a large file
136
- compress_large xz largefile.dat
137
-
138
- # Create a 7z archive with maximum compression
139
- a7z a -mx=9 archive.7z files/
140
-
141
- # Test archive integrity
142
- t7z archive.7z
143
- ```
144
-
145
- [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg
@@ -1,114 +0,0 @@
1
- #!/usr/bin/env bash
2
- # 🅳🅾🆃🅵🅸🅻🅴🆂 - Archive and Compression Management
3
- # Made with ♥ by Sebastien Rousseau
4
- # License: MIT
5
-
6
- #-----------------------------------------------------------------------------
7
- # Extract Function
8
- #-----------------------------------------------------------------------------
9
- # Archive and Compression Management
10
-
11
- extract() {
12
- if [ -z "$1" ]; then
13
- echo "Usage: extract <archive_file>"
14
- return 1
15
- fi
16
-
17
- if [ ! -f "$1" ]; then
18
- echo "Error: '$1' is not a valid file"
19
- return 1
20
- fi
21
-
22
- case "$1" in
23
- *.tar.bz2|*.tbz2) tar xvjf "$1" ;;
24
- *.tar.gz|*.tgz) tar xvzf "$1" ;;
25
- *.tar.xz) tar xvJf "$1" ;;
26
- *.tar.zst) tar --zstd -xvf "$1" ;;
27
- *.tar) tar xvf "$1" ;;
28
- *.bz2) bunzip2 "$1" ;;
29
- *.gz) gunzip "$1" ;;
30
- *.rar) unrar x "$1" ;;
31
- *.zip) unzip "$1" ;;
32
- *.Z) uncompress "$1" ;;
33
- *.7z) 7z x "$1" ;;
34
- *.zst) unzstd "$1" ;;
35
- *.xz) unxz "$1" ;;
36
- *.lz4) lz4 -d "$1" ;;
37
- *) echo "Error: '$1' cannot be extracted" && return 1 ;;
38
- esac
39
- }
40
-
41
- #-----------------------------------------------------------------------------
42
- # Compress Function
43
- #-----------------------------------------------------------------------------
44
- compress_large() {
45
- if [ -z "$1" ] || [ -z "$2" ]; then
46
- echo "Usage: compress_large <format> <input_file> [output_file]"
47
- return 1
48
- fi
49
-
50
- local format="$1"
51
- local input="$2"
52
- local output="${3:-${input}.${format}}"
53
-
54
- if [ ! -f "$input" ]; then
55
- echo "Error: '$input' is not a valid file"
56
- return 1
57
- fi
58
-
59
- case "$format" in
60
- gz) gzip -c "$input" > "$output" ;;
61
- bz2) bzip2 -c "$input" > "$output" ;;
62
- xz) xz -c "$input" > "$output" ;;
63
- zst) zstd -c "$input" > "$output" ;;
64
- lz4) lz4 -c "$input" > "$output" ;;
65
- *) echo "Error: Unsupported format '$format'" && return 1 ;;
66
- esac
67
- echo "Compressed '$input' to '$output'"
68
- }
69
-
70
- #-----------------------------------------------------------------------------
71
- # Aliases
72
- #-----------------------------------------------------------------------------
73
- # 7-Zip Aliases
74
- alias a7z='7z a' # Create 7z archive
75
- alias x7z='7z x' # Extract 7z archive
76
-
77
- # Tar Aliases
78
- alias ctar='tar -cvf' # Create tar archive
79
- alias xtar='tar -xvf' # Extract tar archive
80
- alias ltar='tar -tvf' # List tar archive contents
81
- alias ctgz='tar -zcvf' # Create tar.gz archive
82
- alias xtgz='tar -zxvf' # Extract tar.gz archive
83
- alias ctbz='tar -jcvf' # Create tar.bz2 archive
84
- alias xtbz='tar -jxvf' # Extract tar.bz2 archive
85
- alias ctxz='tar -Jcvf' # Create tar.xz archive
86
- alias xtxz='tar -Jxvf' # Extract tar.xz archive
87
- alias ctzst='tar --zstd -cvf' # Create tar.zst archive
88
- alias xtzst='tar --zstd -xvf' # Extract tar.zst archive
89
-
90
- # Zip Aliases
91
- alias czip='zip -r' # Create zip archive
92
- alias xzip='unzip' # Extract zip archive
93
- alias lzip='unzip -l' # List zip archive contents
94
-
95
- # Gzip Aliases
96
- alias cgz='gzip -cv' # Compress with gzip
97
- alias xgz='gzip -dv' # Extract gzip
98
-
99
- # Bzip2 Aliases
100
- alias cbz='bzip2 -zk' # Compress with bzip2
101
- alias xbz='bzip2 -dk' # Extract bzip2
102
-
103
- # XZ Aliases
104
- alias cxz='xz -z' # Compress with xz
105
- alias xxz='xz -d' # Extract xz
106
-
107
- # Zstd Aliases
108
- alias czst='zstd -z' # Compress with zstd
109
- alias xzst='zstd -d' # Extract zstd
110
-
111
- # LZ4 Aliases
112
- alias clz4='lz4 -zc' # Compress with lz4
113
- alias xlz4='lz4 -dc' # Extract lz4
114
-
@@ -1,146 +0,0 @@
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
- />
8
- <!-- markdownlint-enable MD033 MD041 -->
9
-
10
- # Dotfiles (v0.2.469)
11
-
12
- Seamlessly enhance your shell environment 🐚
13
-
14
- ![Dotfiles banner][banner]
15
-
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)
145
-
146
- [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg
@@ -1,51 +0,0 @@
1
- #!/usr/bin/env bash
2
- ################################################################################
3
- # 🅳🅾🆃🅵🅸🅻🅴🆂 - Change directory aliases
4
- # Made with ♥ by Sebastien Rousseau
5
- # License: MIT
6
- # This script provides aliases to quickly change directories.
7
- ################################################################################
8
-
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"
22
-
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
31
-
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
45
-
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,160 +0,0 @@
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
- />
8
- <!-- markdownlint-enable MD033 MD041 -->
9
-
10
- # Dotfiles (v0.2.469)
11
-
12
- Simply designed to fit your shell life 🐚
13
-
14
- ![Dotfiles banner][banner]
15
-
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)
159
-
160
- [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg