@sebastienrousseau/dotfiles 0.2.465 → 0.2.468

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 (167) hide show
  1. package/LICENSE +20 -17
  2. package/README.md +150 -155
  3. package/dist/Makefile +2 -2
  4. package/dist/bin/backup.js.map +1 -1
  5. package/dist/bin/constants.d.ts +2 -2
  6. package/dist/bin/constants.js +1 -1
  7. package/dist/bin/dotfiles.d.ts +2 -2
  8. package/dist/bin/dotfiles.d.ts.map +1 -1
  9. package/dist/bin/dotfiles.js +1 -2
  10. package/dist/bin/dotfiles.js.map +1 -1
  11. package/dist/bin/download.d.ts +2 -2
  12. package/dist/bin/download.d.ts.map +1 -1
  13. package/dist/bin/download.js +1 -2
  14. package/dist/bin/download.js.map +1 -1
  15. package/dist/bin/index.js +1 -1
  16. package/dist/bin/index.js.map +1 -1
  17. package/dist/filesizes.txt +92 -94
  18. package/dist/lib/README.md +9 -5
  19. package/dist/lib/aliases/README.md +16 -8
  20. package/dist/lib/aliases/archives/README.md +29 -26
  21. package/dist/lib/aliases/archives/archives.aliases.sh +148 -145
  22. package/dist/lib/aliases/cd/README.md +46 -44
  23. package/dist/lib/aliases/cd/cd.aliases.sh +63 -29
  24. package/dist/lib/aliases/chmod/README.md +8 -4
  25. package/dist/lib/aliases/chmod/chmod.aliases.sh +60 -42
  26. package/dist/lib/aliases/clear/README.md +8 -4
  27. package/dist/lib/aliases/clear/clear.aliases.sh +57 -28
  28. package/dist/lib/aliases/configuration/README.md +8 -4
  29. package/dist/lib/aliases/configuration/configuration.aliases.sh +56 -30
  30. package/dist/lib/aliases/default/README.md +8 -4
  31. package/dist/lib/aliases/default/default.aliases.sh +99 -86
  32. package/dist/lib/aliases/dig/README.md +8 -4
  33. package/dist/lib/aliases/dig/dig.aliases.sh +3 -3
  34. package/dist/lib/aliases/disk-usage/README.md +8 -4
  35. package/dist/lib/aliases/disk-usage/du.aliases.sh +2 -2
  36. package/dist/lib/aliases/editor/README.md +8 -4
  37. package/dist/lib/aliases/editor/editor.aliases.sh +3 -3
  38. package/dist/lib/aliases/find/README.md +8 -4
  39. package/dist/lib/aliases/find/find.aliases.sh +3 -3
  40. package/dist/lib/aliases/gcloud/README.md +8 -4
  41. package/dist/lib/aliases/gcloud/gcloud.aliases.sh +3 -3
  42. package/dist/lib/aliases/git/README.md +8 -4
  43. package/dist/lib/aliases/git/git.aliases.sh +2 -2
  44. package/dist/lib/aliases/gnu/README.md +8 -4
  45. package/dist/lib/aliases/gnu/gnucoreutils-aliases.sh +1 -1
  46. package/dist/lib/aliases/heroku/README.md +8 -4
  47. package/dist/lib/aliases/heroku/heroku.aliases.sh +2 -2
  48. package/dist/lib/aliases/interactive/README.md +29 -17
  49. package/dist/lib/aliases/interactive/interactive.aliases.sh +14 -17
  50. package/dist/lib/aliases/jekyll/README.md +8 -4
  51. package/dist/lib/aliases/jekyll/jekyll.aliases.sh +3 -3
  52. package/dist/lib/aliases/list/README.md +8 -4
  53. package/dist/lib/aliases/list/list.aliases.sh +2 -2
  54. package/dist/lib/aliases/{macos → macOS}/README.md +8 -4
  55. package/dist/lib/aliases/{macos → macOS}/macos.aliases.sh +2 -2
  56. package/dist/lib/aliases/make/README.md +8 -4
  57. package/dist/lib/aliases/make/make.aliases.sh +2 -2
  58. package/dist/lib/aliases/mkdir/README.md +8 -4
  59. package/dist/lib/aliases/mkdir/mkdir.aliases.sh +2 -2
  60. package/dist/lib/aliases/npm/README.md +8 -4
  61. package/dist/lib/aliases/npm/npm.aliases.sh +2 -2
  62. package/dist/lib/aliases/permission/README.md +8 -4
  63. package/dist/lib/aliases/permission/permission.aliases.sh +2 -2
  64. package/dist/lib/aliases/pnpm/README.md +8 -4
  65. package/dist/lib/aliases/pnpm/pnpm.aliases.sh +2 -2
  66. package/dist/lib/aliases/ps/README.md +8 -4
  67. package/dist/lib/aliases/ps/ps.aliases.sh +2 -2
  68. package/dist/lib/aliases/rsync/README.md +8 -4
  69. package/dist/lib/aliases/rsync/rsync.aliases.sh +2 -2
  70. package/dist/lib/aliases/rust/README.md +8 -4
  71. package/dist/lib/aliases/rust/rust.aliases.sh +23 -23
  72. package/dist/lib/aliases/subversion/README.md +8 -4
  73. package/dist/lib/aliases/subversion/subversion.aliases.sh +2 -2
  74. package/dist/lib/aliases/sudo/README.md +8 -4
  75. package/dist/lib/aliases/sudo/sudo.aliases.sh +2 -2
  76. package/dist/lib/aliases/tmux/README.md +8 -4
  77. package/dist/lib/aliases/tmux/tmux.aliases.sh +2 -2
  78. package/dist/lib/aliases/update/README.md +8 -4
  79. package/dist/lib/aliases/update/update.aliases.sh +2 -2
  80. package/dist/lib/aliases/uuid/README.md +8 -4
  81. package/dist/lib/aliases/uuid/uuid.aliases.sh +2 -2
  82. package/dist/lib/aliases/wget/README.md +8 -4
  83. package/dist/lib/aliases/wget/wget.aliases.sh +2 -2
  84. package/dist/lib/aliases.sh +42 -12
  85. package/dist/lib/configurations/README.md +8 -4
  86. package/dist/lib/configurations/bash/bashrc +3 -3
  87. package/dist/lib/configurations/curl/curlrc +2 -2
  88. package/dist/lib/configurations/default/color.sh +2 -2
  89. package/dist/lib/configurations/default/constants.sh +3 -3
  90. package/dist/lib/configurations/default/editor.sh +2 -2
  91. package/dist/lib/configurations/default/prompt.sh +2 -2
  92. package/dist/lib/configurations/input/inputrc +2 -2
  93. package/dist/lib/configurations/nano/nanorc +2 -2
  94. package/dist/lib/configurations/profile/profile +2 -2
  95. package/dist/lib/configurations/tmux/default +2 -2
  96. package/dist/lib/configurations/tmux/display +2 -2
  97. package/dist/lib/configurations/tmux/linux +2 -2
  98. package/dist/lib/configurations/tmux/navigation +2 -2
  99. package/dist/lib/configurations/tmux/panes +2 -2
  100. package/dist/lib/configurations/tmux/theme +3 -3
  101. package/dist/lib/configurations/tmux/tmux +2 -2
  102. package/dist/lib/configurations/vim/vimrc +1 -1
  103. package/dist/lib/configurations/wget/wgetrc +2 -2
  104. package/dist/lib/configurations/zsh/zshrc +11 -11
  105. package/dist/lib/configurations.sh +27 -9
  106. package/dist/lib/functions/README.md +12 -4
  107. package/dist/lib/functions/cdls.sh +2 -2
  108. package/dist/lib/functions/curlheader.sh +2 -2
  109. package/dist/lib/functions/curlstatus.sh +2 -2
  110. package/dist/lib/functions/curltime.sh +3 -3
  111. package/dist/lib/functions/encode64.sh +2 -2
  112. package/dist/lib/functions/environment.sh +2 -2
  113. package/dist/lib/functions/extract.sh +2 -2
  114. package/dist/lib/functions/freespace.sh +2 -2
  115. package/dist/lib/functions/genpwd.sh +4 -4
  116. package/dist/lib/functions/goto.sh +2 -2
  117. package/dist/lib/functions/hidehiddenfiles.sh +2 -2
  118. package/dist/lib/functions/hostinfo.sh +2 -2
  119. package/dist/lib/functions/hstats.sh +2 -2
  120. package/dist/lib/functions/httpdebug.sh +2 -2
  121. package/dist/lib/functions/keygen.sh +2 -2
  122. package/dist/lib/functions/last.sh +2 -2
  123. package/dist/lib/functions/logout.sh +2 -2
  124. package/dist/lib/functions/lowercase.sh +2 -2
  125. package/dist/lib/functions/matrix.sh +2 -2
  126. package/dist/lib/functions/mount_read_only.sh +2 -2
  127. package/dist/lib/functions/myproc.sh +2 -2
  128. package/dist/lib/functions/prependpath.sh +2 -2
  129. package/dist/lib/functions/ql.sh +2 -2
  130. package/dist/lib/functions/rd.sh +2 -2
  131. package/dist/lib/functions/remove_disk.sh +2 -2
  132. package/dist/lib/functions/ren.sh +2 -2
  133. package/dist/lib/functions/showhiddenfiles.sh +2 -2
  134. package/dist/lib/functions/size.sh +2 -2
  135. package/dist/lib/functions/stopwatch.sh +2 -2
  136. package/dist/lib/functions/uppercase.sh +2 -2
  137. package/dist/lib/functions/view-source.sh +2 -2
  138. package/dist/lib/functions/vscode.sh +2 -2
  139. package/dist/lib/functions/whoisport.sh +2 -2
  140. package/dist/lib/functions/zipf.sh +2 -2
  141. package/dist/lib/functions.sh +27 -10
  142. package/dist/lib/history.sh +58 -21
  143. package/dist/lib/paths/ant/ant.paths.sh +2 -2
  144. package/dist/lib/paths/default/default.paths.sh +2 -2
  145. package/dist/lib/paths/homebrew/homebrew.paths.sh +2 -2
  146. package/dist/lib/paths/java/java.paths.sh +2 -2
  147. package/dist/lib/paths/maven/maven.paths.sh +2 -2
  148. package/dist/lib/paths/node/node.paths.sh +2 -2
  149. package/dist/lib/paths/nvm/nvm.paths.sh +2 -2
  150. package/dist/lib/paths/pnpm/pnpm.paths.sh +2 -2
  151. package/dist/lib/paths/python/python.paths.sh +2 -2
  152. package/dist/lib/paths/ruby/ruby.paths.sh +2 -2
  153. package/dist/lib/paths/tmux/tmux.paths.sh +2 -2
  154. package/dist/lib/paths.sh +28 -12
  155. package/dist/scripts/backup.sh +2 -2
  156. package/dist/scripts/banner.sh +2 -2
  157. package/dist/scripts/build.sh +2 -2
  158. package/dist/scripts/clean.sh +2 -2
  159. package/dist/scripts/compile.sh +2 -2
  160. package/dist/scripts/copy.sh +2 -2
  161. package/dist/scripts/dotfiles.sh +2 -2
  162. package/dist/scripts/download.sh +2 -2
  163. package/dist/scripts/help.sh +2 -2
  164. package/dist/scripts/ssh.sh +2 -2
  165. package/dist/scripts/unpack.sh +2 -2
  166. package/package.json +6 -5
  167. package/dist/lib/configurations/tmux/vi +0 -9
@@ -1,41 +1,70 @@
1
1
  #!/usr/bin/env bash
2
- # Author: Sebastien Rousseau
3
- # Copyright (c) 2015-2023. All rights reserved
4
- # Description: Sets aliases for the `chmod` command.
5
- # License: MIT
2
+
3
+ ################################################################################
4
+ # 🅳🅾🆃🅵🅸🅻🅴🆂
6
5
  # Script: chmod.aliases.sh
7
- # Version: 0.2.465
6
+ # Version: 0.2.468
7
+ # Author: @wwdseb
8
+ # Copyright (c) 2015-2024. All rights reserved
9
+ # Description: Enhanced chmod command aliases with safety features, input validation, and structured organization.
8
10
  # Website: https://dotfiles.io
11
+ # License: MIT
12
+ ################################################################################
13
+
14
+ # Ensuring chmod command is available
15
+ if command -v chmod >/dev/null; then
9
16
 
10
- # 🅲🅷🅼🅾🅳 🅰🅻🅸🅰🆂🅴🆂
11
- if command -v 'chmod' >/dev/null; then
17
+ # Validate input for permission and path
18
+ function validate_input() {
19
+ local permission="$1"
20
+ local path="$2"
21
+ # Validate permission pattern (e.g., numeric octal)
22
+ if ! [[ ${permission} =~ ^[0-7]{3}$ ]]; then
23
+ echo "Invalid permission format: ${permission}. Expected format: ### (e.g., 644)."
24
+ return 1
25
+ fi
26
+ # Validate path existence
27
+ if ! [[ -e "${path}" ]]; then
28
+ echo "Path does not exist: ${path}."
29
+ return 1
30
+ fi
31
+ return 0
32
+ }
12
33
 
13
- # Shortcuts to change permissions
14
- alias 000='chmod -R 000' # 000: (chmod a-rwx) sets permissions so that, (U)ser / owner can't read, can't write and can't execute. (G)roup can't read, can't write and can't execute. (O)thers can't read, can't write and can't execute.
15
- alias 400='chmod -R 400' # 400: (chmod a-rw) sets permissions so that, (U)ser / owner can't read, can't write and can execute. (G)roup can't read, can't write and can execute. (O)thers can't read, can't write and can execute.
16
- alias 444='chmod -R 444' # 444: (chmod a-r) sets permissions so that, (U)ser / owner can't read, can't write and can execute. (G)roup can't read, can't write and can execute. (O)thers can't read, can't write and can execute.
17
- alias 600='chmod -R 600' # 600: (chmod a+rwx,u-x,g-rwx,o-rwx) sets permissions so that, (U)ser / owner can read, can write and can't execute. (G)roup can't read, can't write and can't execute. (O)thers can't read, can't write and can't execute.
18
- alias 644='chmod -R 644' # 644: (chmod a+rwx,u-x,g-wx,o-wx) sets permissions so that, (U)ser / owner can read, can write and can't execute. (G)roup can read, can't write and can't execute. (O)thers can read, can't write and can't execute.
19
- alias 666='chmod -R 666' # 666: (chmod a+rwx,u-x,g-x,o-x) sets permissions so that, (U)ser / owner can read, can write and can't execute. (G)roup can read, can write and can't execute. (O)thers can read, can write and can't execute.
20
- alias 755='chmod -R 755' # 755: (chmod a+rwx,g-w,o-w) sets permissions so that, (U)ser / owner can read, can write and can execute. (G)roup can read, can't write and can execute. (O)thers can read, can't write and can execute.
21
- alias 764='chmod -R 764' # 764: (chmod a+rwx,g-x,o-wx) sets permissions so that, (U)ser / owner can read, can write and can execute. (G)roup can read, can write and can't execute. (O)thers can read, can't write and can't execute.
22
- alias 777='chmod -R 777' # 777: (chmod a+rwx) sets permissions so that, (U)ser / owner can read, can write and can execute. (G)roup can read, can write and can execute. (O)thers can read, can write and can execute.
34
+ # Function to change permissions with confirmation for recursive changes
35
+ function change_permission() {
36
+ local permission="$1"
37
+ local path="$2"
38
+ local recursive="$3"
39
+ local confirm
23
40
 
24
- # Shortcuts to change ownership
25
- alias chgrp='chgrp -v' # chgrp: Change group ownership of files or directories.
26
- alias chgrpr='chgrp -Rv' # chgrpr: Change group ownership of files or directories recursively.
27
- alias chgrpu='chgrp -Rv ${USER}' # chgrpu: Change group ownership of files or directories recursively to the current user.
28
- alias chmod='chmod -v' # chmod: Change file mode bits.
29
- alias chmodr='chmod -Rv' # chmodr: Change file mode bits recursively.
30
- alias chmodu='chmod -Rv u+rwX' # chmodu: Change file mode bits recursively to the current user.
31
- alias chmox='chmod +x' # chmox: Make a file executable.
32
- alias chown='chown -v' # chown: Change file owner and group.
33
- alias chownr='chown -Rv' # chownr: Change file owner and group recursively.
34
- alias chownu='chown -Rv ${USER}' # chownu: Change file owner and group recursively to the current user.
41
+ # Validate inputs
42
+ if ! validate_input "${permission}" "${path}"; then
43
+ return 1
44
+ fi
35
45
 
36
- # Shortcuts to set permissions for specific file types
37
- alias 755d='find . -type d -exec chmod 755 {} \;' # 755d: Set permissions of all directories to rwxr-xr-x.
38
- alias 644f='find . -type f -exec chmod 644 {} \;' # 644f: Set permissions of all files to rw-r--r--.
46
+ # Confirmation for recursive changes
47
+ if [[ "${recursive}" == "-R" ]]; then
48
+ read -rp "Confirm recursive change to ${permission} for ${path}? (y/N): " confirm
49
+ if [[ ${confirm} != [yY] ]]; then
50
+ echo "Operation cancelled."
51
+ return
52
+ fi
53
+ fi
54
+
55
+ chmod "${recursive}" "${permission}" "${path}" && echo "Permissions set to ${permission} on ${path}"
56
+ }
57
+
58
+ # Alias definitions using the function for common permissions
59
+ alias perm000='change_permission 000'
60
+ alias perm400='change_permission 400'
61
+ alias perm444='change_permission 444'
62
+ alias perm600='change_permission 600'
63
+ alias perm644='change_permission 644'
64
+ alias perm666='change_permission 666'
65
+ alias perm755='change_permission 755'
66
+ alias perm764='change_permission 764'
67
+ alias perm777='change_permission 777'
39
68
 
40
69
  # Shortcuts to set permissions for specific user types
41
70
  alias u+x='chmod u+x' # u+x: Add execute permission for the owner of the file.
@@ -59,15 +88,4 @@ if command -v 'chmod' >/dev/null; then
59
88
  alias o+r='chmod o+r' # o+r: Add read permission for others.
60
89
  alias o-r='chmod o-r' # o-r: Remove read permission for others.
61
90
 
62
- # Shortcuts to set permissions based on octal notation
63
- alias 000='chmod 000' # 000: Set permissions to ----------
64
- alias 400='chmod 400' # 400: Set permissions to r--------
65
- alias 444='chmod 444' # 444: Set permissions to r--r--r--
66
- alias 600='chmod 600' # 600: Set permissions to rw-------
67
- alias 644='chmod 644' # 644: Set permissions to rw-r--r--.
68
- alias 664='chmod 664' # 664: Set permissions to rw-rw-r--.
69
- alias 755='chmod 755' # 755: Set permissions to rwxr-xr-x.
70
- alias 775='chmod 775' # 775: Set permissions to rwxrwxr-x.
71
- alias 777='chmod 777' # 777: Set permissions to rwxrwxrwx.
72
-
73
91
  fi
@@ -1,11 +1,15 @@
1
- <!-- markdownlint-disable MD033 MD041 -->
1
+ <!-- markdownlint-disable MD033 MD041 MD043 -->
2
2
 
3
- <img src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
4
- alt="dotfiles logo" width="261" align="right" />
3
+ <img
4
+ src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
5
+ alt="dotfiles logo"
6
+ width="261"
7
+ align="right"
8
+ />
5
9
 
6
10
  <!-- markdownlint-enable MD033 MD041 -->
7
11
 
8
- # Dotfiles (v0.2.465)
12
+ # Dotfiles (v0.2.468)
9
13
 
10
14
  Simply designed to fit your shell life 🐚
11
15
 
@@ -1,42 +1,71 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- # 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.465) - <https://dotfiles.io>
4
- # Made with ♥ in London, UK by @wwdseb
5
- # Copyright (c) 2015-2023. All rights reserved
6
- # License: MIT
3
+ ################################################################################
4
+ # 🅳🅾🆃🅵🅸🅻🅴🆂
7
5
  # Script: clear.aliases.sh
8
- # Version: 0.2.465
6
+ # Version: 0.2.468
7
+ # Author: @wwdseb
8
+ # Copyright (c) 2015-2024. All rights reserved
9
+ # Description: Enhances terminal interaction with aliases for clearing the screen,
10
+ # navigating directories, and displaying directory contents in an organized manner.
9
11
  # Website: https://dotfiles.io
12
+ # License: MIT
13
+ ################################################################################
10
14
 
11
- # 🅲🅻🅴🅰🆁 🅰🅻🅸🅰🆂🅴🆂
15
+ # Configurable paths
16
+ WORKSPACE_DIR="${HOME}/workspace"
12
17
 
13
- # Alias to change to the workspace directory
14
- alias cdw="cd ~/workspace"
18
+ # Validate directory existence
19
+ function validate_dir() {
20
+ if [[ ! -d "$1" ]]; then
21
+ echo "Directory $1 not found."
22
+ return 1
23
+ fi
24
+ return 0
25
+ }
15
26
 
16
- # Alias to clear the terminal screen
17
- alias c="clear"
27
+ # Functions for aliases
28
+ function cd_workspace() {
29
+ validate_dir "${WORKSPACE_DIR}" && cd "${WORKSPACE_DIR}" || return
30
+ }
18
31
 
19
- # Alias to clear the terminal screen and list the contents of the
20
- # current directory
21
- alias clc="clear && ls -a"
32
+ function clear_screen() {
33
+ clear
34
+ }
22
35
 
23
- # Alias to clear the terminal screen and print the current working
24
- # directory and the contents of the current directory
25
- alias cpl="clear && pwd && echo '' && ls -a && echo ''"
36
+ function clear_list_current() {
37
+ clear && ls -a
38
+ }
26
39
 
27
- # Alias to clear the terminal screen and print the current working
28
- # directory and the directory tree
29
- alias cplt="clear && pwd && echo '' && tree ./ && echo ''"
40
+ function clear_pwd_list() {
41
+ clear && pwd && echo '' && ls -a && echo ''
42
+ }
30
43
 
31
- # Alias to clear the terminal screen and print the command history
32
- alias clh="clear && history"
44
+ function clear_pwd_tree() {
45
+ clear && pwd && echo '' && tree ./ && echo ''
46
+ }
33
47
 
34
- # Alias to clear the terminal screen
35
- alias cl="c"
48
+ function clear_history() {
49
+ clear && history
50
+ }
36
51
 
37
- # Alias to clear the terminal screen and print the current
38
- # working directory
39
- alias clp="pwd"
52
+ function print_working_dir() {
53
+ pwd
54
+ }
55
+
56
+ function clear_print_tree() {
57
+ clear && tree
58
+ }
59
+
60
+ # 🅲🅻🅴🅰🆁 🅰🅻🅸🅰🆂🅴🆂
40
61
 
41
- # Alias to clear the terminal screen and print the directory tree
42
- alias clt="clear && tree"
62
+ # Alias definitions
63
+ alias cdw='cd_workspace'
64
+ alias c='clear_screen'
65
+ alias clc='clear_list_current'
66
+ alias cpl='clear_pwd_list'
67
+ alias cplt='clear_pwd_tree'
68
+ alias clh='clear_history'
69
+ alias cl='clear_screen'
70
+ alias clp='print_working_dir'
71
+ alias clt='clear_print_tree'
@@ -1,11 +1,15 @@
1
- <!-- markdownlint-disable MD033 MD041 -->
1
+ <!-- markdownlint-disable MD033 MD041 MD043 -->
2
2
 
3
- <img src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
4
- alt="dotfiles logo" width="261" align="right" />
3
+ <img
4
+ src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
5
+ alt="dotfiles logo"
6
+ width="261"
7
+ align="right"
8
+ />
5
9
 
6
10
  <!-- markdownlint-enable MD033 MD041 -->
7
11
 
8
- # Dotfiles (v0.2.465)
12
+ # Dotfiles (v0.2.468)
9
13
 
10
14
  Simply designed to fit your shell life 🐚
11
15
 
@@ -1,47 +1,73 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- # 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.465) - <https://dotfiles.io>
4
- # Made with ♥ in London, UK by @wwdseb
5
- # Copyright (c) 2015-2023. All rights reserved
6
- # License: MIT
3
+ ################################################################################
4
+ # 🅳🅾🆃🅵🅸🅻🅴🆂
7
5
  # Script: configuration.aliases.sh
8
- # Version: 0.2.465
6
+ # Version: 0.2.468
7
+ # Author: @wwdseb
8
+ # Copyright (c) 2015-2024. All rights reserved
9
+ # Description: Script containing aliases to open configuration files in default
10
+ # editor
9
11
  # Website: https://dotfiles.io
12
+ # License: MIT
13
+ ################################################################################
14
+
15
+ # Set default text editor
16
+ EDITOR="${EDITOR:-vi}"
17
+
18
+ # Apache aliases
19
+ # ------------------------------------------------------------------------------
20
+
21
+ # Open Apache configuration file in default text editor
22
+ alias edit_apache_config='${EDITOR} /etc/apache2/apache2.conf'
23
+
24
+ # Bash aliases
25
+ # ------------------------------------------------------------------------------
26
+
27
+ # Open Bash configuration file in default text editor
28
+ alias edit_bashrc='${EDITOR} $HOME/.bashrc'
29
+
30
+ # Open Bash profile in default text editor
31
+ alias edit_bash_profile='${EDITOR} $HOME/.bash_profile'
32
+
33
+ # Docker aliases
34
+ # ------------------------------------------------------------------------------
10
35
 
11
- # 🅲🅾🅽🅵🅸🅶🆄🆁🅰🆃🅸🅾🅽 🅰🅻🅸🅰🆂🅴🆂
36
+ # Open Docker Compose file in default text editor
37
+ alias edit_docker_compose='${EDITOR} docker-compose.yml'
12
38
 
13
- # Alias to open the Apache configuration file in the default text editor
14
- alias apconf='${=EDITOR} /etc/apache2/apache2.conf'
39
+ # General aliases
40
+ # ------------------------------------------------------------------------------
15
41
 
16
- # Alias to open the Bash configuration file in the default text editor
17
- alias bshrc='${=EDITOR} $HOME/.bashrc'
42
+ # Open current directory in default text editor
43
+ alias edit_current_directory='${EDITOR} .'
18
44
 
19
- # Alias to open the Bash profile in the default text editor
20
- alias bshp='${=EDITOR} $HOME/.bash_profile'
45
+ # Git aliases
46
+ # ------------------------------------------------------------------------------
21
47
 
22
- # Alias to open the Docker Compose file in the default text editor
23
- alias dockcomp='${=EDITOR} docker-compose.yml'
48
+ # Open Git configuration file in default text editor
49
+ alias edit_git_config='${EDITOR} $HOME/.gitconfig'
24
50
 
25
- # Alias to open the current directory in the default text editor
26
- alias eddir='${=EDITOR} .'
51
+ # Open Git ignore file in default text editor
52
+ alias edit_git_ignore='${EDITOR} $HOME/.gitignore'
27
53
 
28
- # Alias to open the Git configuration file in the default text editor
29
- alias gcfg='${=EDITOR} $HOME/.gitconfig'
54
+ # System config aliases
55
+ # ------------------------------------------------------------------------------
30
56
 
31
- # Alias to open the Git ignore file in the default text editor
32
- alias gign='${=EDITOR} $HOME/.gitignore'
57
+ # Open hosts file in default text editor
58
+ alias edit_hosts='${EDITOR} /etc/hosts'
33
59
 
34
- # Alias to open the hosts file in the default text editor
35
- alias hosts='${=EDITOR} /etc/hosts'
60
+ # Open Nginx configuration file in default text editor
61
+ alias edit_nginx_config='${EDITOR} /etc/nginx/nginx.conf'
36
62
 
37
- # Alias to open the Nginx configuration file in the default text editor
38
- alias ngconf='${=EDITOR} /etc/nginx/nginx.conf'
63
+ # Open SSH configuration file in default text editor
64
+ alias edit_ssh_config='${EDITOR} $HOME/.ssh/config'
39
65
 
40
- # Alias to open the SSH configuration file in the default text editor
41
- alias sshconf='${=EDITOR} $HOME/.ssh/config'
66
+ # Open Zsh configuration file in default text editor
67
+ alias edit_zshrc='${EDITOR} $HOME/.zshrc'
42
68
 
43
- # Alias to open the Zsh configuration file in the default text editor
44
- alias zshrc='${=EDITOR} $HOME/.zshrc'
69
+ # Open Zsh profile in default text editor
70
+ alias edit_zsh_profile='${EDITOR} $HOME/.zsh_profile'
45
71
 
46
- # Alias to open the Zsh profile in the default text editor
47
- alias zshp='${=EDITOR} $HOME/.zsh_profile'
72
+ # Add blank lines between groups
73
+ echo -e "\n\n"
@@ -1,11 +1,15 @@
1
- <!-- markdownlint-disable MD033 MD041 -->
1
+ <!-- markdownlint-disable MD033 MD041 MD043 -->
2
2
 
3
- <img src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
4
- alt="dotfiles logo" width="261" align="right" />
3
+ <img
4
+ src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
5
+ alt="dotfiles logo"
6
+ width="261"
7
+ align="right"
8
+ />
5
9
 
6
10
  <!-- markdownlint-enable MD033 MD041 -->
7
11
 
8
- # Dotfiles (v0.2.465)
12
+ # Dotfiles (v0.2.468)
9
13
 
10
14
  Simply designed to fit your shell life 🐚
11
15
 
@@ -1,126 +1,139 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- # 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.465) - <https://dotfiles.io>
4
- # Made with ♥ in London, UK by @wwdseb
5
- # Copyright (c) 2015-2023. All rights reserved
6
- # License: MIT
3
+ ################################################################################
4
+ # 🅳🅾🆃🅵🅸🅻🅴🆂
7
5
  # Script: default.aliases.sh
8
- # Version: 0.2.465
6
+ # Version: 0.2.468
7
+ # Author: @wwdseb
8
+ # Copyright (c) 2015-2024. All rights reserved
9
+ # Description: Script containing default shell aliases
9
10
  # Website: https://dotfiles.io
11
+ # License: MIT
12
+ ################################################################################
10
13
 
11
- # 🅳🅴🅵🅰🆄🅻🆃 🅰🅻🅸🅰🆂🅴🆂
12
-
13
- ## General aliases
14
-
15
- # Shortcut for the `clear` command.
16
- alias c="clear"
17
-
18
- # Display the current date and time.
19
- alias da='date "+%Y-%m-%d %A %T %Z"'
20
-
21
- # Lists all recently used commands.
22
- alias h='history'
14
+ # Function: set_default_aliases
15
+ #
16
+ # Description:
17
+ # Sets default shell aliases for enhanced shell usage.
18
+ #
19
+ # Arguments:
20
+ # None
21
+ #
22
+ # Notes:
23
+ # - Some aliases are designed for enhanced shell navigation and utility.
24
+ # - Ensure to validate that all aliases work as expected in the bash shell.
23
25
 
24
- # Shortcut for `pwd` which returns working directory name.
25
- alias p='pwd'
26
+ set_default_aliases() {
27
+ fc -W
26
28
 
27
- # Display the $PATH variable on newlines.
28
- alias path='echo ${PATH//:/\\n}'
29
+ ## General aliases
30
+ # Shortcut for the `clear` command.
31
+ alias c="clear"
29
32
 
30
- # Reload the shell.
31
- alias r='reload'
33
+ # Display the current date and time.
34
+ alias da='date "+%Y-%m-%d %A %T %Z"'
32
35
 
33
- # Prints the last 10 lines of a text or log file, and then waits for new
34
- # additions to the file to print it in real time.
35
- alias t='tail -f'
36
+ # Shortcut for `pwd` which returns working directory name.
37
+ alias p='pwd'
36
38
 
37
- # wk: Show the current week number.
38
- alias wk='date +%V'
39
+ # Display the $PATH variable on newlines.
40
+ alias path='echo ${PATH//:/\\n}'
39
41
 
40
- ## Exit/shutdown aliases
42
+ # Reload the shell.
43
+ alias r='reload'
41
44
 
42
- # Shortcut for the `exit` command.
43
- alias ':q'='quit'
45
+ # Prints the last 10 lines of a text or log file, and then waits for new
46
+ # additions to the file to print it in real time.
47
+ alias t='tail -f'
44
48
 
45
- # Shortcut for the `exit` command.
46
- alias bye='quit'
49
+ # Show the current week number.
50
+ alias wk='date +%V'
47
51
 
48
- # Shortcut for the `exit` command.
49
- alias q='quit'
52
+ ## Exit/shutdown aliases
53
+ # Shortcut for the `exit` command.
54
+ alias ':q'='quit'
50
55
 
51
- # Shortcut for the `exit` command.
52
- alias x='quit'
56
+ # Shortcut for the `exit` command.
57
+ alias bye='quit'
53
58
 
54
- # Shortcut for the `exit` command.
55
- alias quit='exit'
59
+ # Shortcut for the `exit` command.
60
+ alias q='quit'
56
61
 
57
- # Shutdown the system.
58
- alias halt='sudo /sbin/halt'
62
+ # Shortcut for the `exit` command.
63
+ alias x='quit'
59
64
 
60
- # Poweroff the system.
61
- alias poweroff='sudo /sbin/shutdown'
65
+ # Shortcut for the `exit` command.
66
+ alias quit='exit'
62
67
 
63
- # Reboot the system.
64
- alias reboot='sudo /sbin/reboot'
68
+ # Shutdown the system.
69
+ alias halt='sudo /sbin/halt'
65
70
 
66
- ## Network aliases
71
+ # Alias to list recent commands
72
+ alias h='dotfiles_history'
67
73
 
68
- # Append sudo to ifconfig (configure network interface parameters)
69
- # command.
70
- alias ifconfig='sudo ifconfig'
74
+ # Alias to view history
75
+ alias history='dotfiles_history'
71
76
 
72
- # Get network interface parameters for en0.
73
- alias ipinfo='ipconfig getpacket en0'
77
+ # Poweroff the system.
78
+ alias poweroff='sudo /sbin/shutdown'
74
79
 
75
- # Show only active network listeners.
76
- alias nls='sudo lsof -i -P | grep LISTEN'
80
+ # Reboot the system.
81
+ alias reboot='sudo /sbin/reboot'
77
82
 
78
- # List of open ports.
79
- alias op='sudo lsof -i -P'
83
+ ## Network aliases
84
+ # Append sudo to ifconfig (configure network interface parameters)
85
+ # command.
86
+ alias ifconfig='sudo ifconfig'
80
87
 
81
- # Limit Ping to 5 ECHO_REQUEST packets.
82
- alias ping='ping -c 5'
88
+ # Get network interface parameters for en0.
89
+ alias ipinfo='ipconfig getpacket en0'
83
90
 
84
- # List all listening ports.
85
- alias ports='netstat -tulan'
91
+ # Show only active network listeners.
92
+ alias nls='sudo lsof -i -P | grep LISTEN'
86
93
 
87
- # Start a simple HTTP server.
88
- alias srv='python3 -m http.server'
94
+ # List of open ports.
95
+ alias op='sudo lsof -i -P'
89
96
 
90
- ## System monitoring aliases
97
+ # Limit Ping to 5 ECHO_REQUEST packets.
98
+ alias ping='ping -c 5'
91
99
 
92
- # Get the moon phase.
93
- alias moon='curl -s "wttr.in/?format=%m"'
100
+ # List all listening ports.
101
+ alias ports='netstat -tulan'
94
102
 
95
- # Allows the user to interactively monitor the system's vital resources
96
- # or server's processes in real time.
97
- alias top='sudo btop'
103
+ # Start a simple HTTP server to serve the current directory on port 8000.
104
+ alias srv='python3 -m http.server 8000 --bind 127.0.0.1'
98
105
 
99
- # Remove all log files in /private/var/log/asl/.
100
- alias spd='sudo rm -rf /private/var/log/asl/*'
106
+ ## System monitoring aliases
107
+ # Allows the user to interactively monitor the system's vital resources
108
+ # or server's processes in real time.
109
+ alias top='sudo btop'
101
110
 
102
- ## Utility aliases
111
+ # Remove all log files in /private/var/log/asl/.
112
+ alias spd='sudo rm -rf /private/var/log/asl/*'
103
113
 
104
- # Count the number of files in the current directory.
105
- alias ctf='echo $(ls -1 | wc -l)'
114
+ ## Utility aliases
115
+ # Count the number of files in the current directory.
116
+ alias ctf='echo $(ls -1 | wc -l)'
106
117
 
107
- # Use compression when transferring data.
108
- alias curl='curl --compressed'
118
+ # Use compression when transferring data.
119
+ alias curl='curl --compressed'
109
120
 
110
- # Quickly search for file.
111
- alias qfind='find . -name '
121
+ # Quickly search for file.
122
+ alias qfind='find . -name '
112
123
 
113
- # Reload the shell.
114
- alias reload='exec $SHELL -l'
124
+ # Reload the shell.
125
+ alias reload='exec $SHELL -l'
115
126
 
116
- # Get the weather.
117
- alias wth='curl -s "wttr.in/?format=3"'
127
+ # Get the weather.
128
+ alias wth='curl -s "wttr.in/?format=3"'
118
129
 
119
- # File system navigation aliases
130
+ ## File system navigation aliases
131
+ # Clear the terminal screen and print the contents of the current
132
+ # directory.
133
+ alias clc='clear && ls -a'
120
134
 
121
- # Clear the terminal screen and print the contents of the current
122
- # directory.
123
- alias clc='clear && ls -a'
135
+ # Clear the terminal screen and print
136
+ alias clp='pwd'
137
+ }
124
138
 
125
- # Clear the terminal screen and print
126
- alias clp='pwd'
139
+ set_default_aliases
@@ -1,11 +1,15 @@
1
- <!-- markdownlint-disable MD033 MD041 -->
1
+ <!-- markdownlint-disable MD033 MD041 MD043 -->
2
2
 
3
- <img src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
4
- alt="dotfiles logo" width="261" align="right" />
3
+ <img
4
+ src="https://kura.pro/dotfiles/v2/images/logos/dotfiles.svg"
5
+ alt="dotfiles logo"
6
+ width="261"
7
+ align="right"
8
+ />
5
9
 
6
10
  <!-- markdownlint-enable MD033 MD041 -->
7
11
 
8
- # Dotfiles (v0.2.465)
12
+ # Dotfiles (v0.2.468)
9
13
 
10
14
  Simply designed to fit your shell life 🐚
11
15
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- # 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.465) - <https://dotfiles.io>
3
+ # 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.468) - <https://dotfiles.io>
4
4
  # Made with ♥ in London, UK by @wwdseb
5
- # Copyright (c) 2015-2023. All rights reserved
5
+ # Copyright (c) 2015-2024. All rights reserved
6
6
  # License: MIT
7
7
  # Script: dig.aliases.sh
8
- # Version: 0.2.465
8
+ # Version: 0.2.468
9
9
  # Website: https://dotfiles.io
10
10
 
11
11
  # 🅳🅸🅶 🅰🅻🅸🅰🆂🅴🆂