From 25945a1842c2e9d630cb6cc388d5f8845d9f50d1 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Fri, 13 Dec 2024 23:21:39 +0000 Subject: [PATCH 01/17] feat(dotfiles): :art: v0.2.469 Add prompt optimisation --- .editorconfig | 6 +- .github/CODE-OF-CONDUCT.md | 2 +- .github/CONTRIBUTING.md | 2 +- .github/SECURITY.md | 2 +- .gitignore | 6 +- .npmrc | 6 +- COPYRIGHT | 2 +- "Icon\r" | 0 Makefile | 6 +- README.md | 8 +- bin/backup.js | 2 +- bin/constants.js | 6 +- bin/copy.js | 2 +- bin/dotfiles.js | 2 +- bin/download.js | 2 +- bin/index.js | 2 +- bin/transfer.js | 2 +- bin/unpack.js | 2 +- lib/aliases.sh | 4 +- lib/aliases/README.md | 2 +- lib/aliases/archives/README.md | 2 +- lib/aliases/archives/archives.aliases.sh | 4 +- lib/aliases/cd/README.md | 2 +- lib/aliases/cd/cd.aliases.sh | 2 +- lib/aliases/chmod/README.md | 2 +- lib/aliases/chmod/chmod.aliases.sh | 4 +- lib/aliases/clear/README.md | 2 +- lib/aliases/clear/clear.aliases.sh | 4 +- lib/aliases/configuration/README.md | 2 +- .../configuration/configuration.aliases.sh | 4 +- lib/aliases/default/README.md | 2 +- lib/aliases/default/default.aliases.sh | 4 +- lib/aliases/dig/README.md | 2 +- lib/aliases/dig/dig.aliases.sh | 8 +- lib/aliases/disk-usage/README.md | 2 +- lib/aliases/disk-usage/du.aliases.sh | 4 +- lib/aliases/editor/README.md | 2 +- lib/aliases/editor/editor.aliases.sh | 8 +- lib/aliases/find/README.md | 2 +- lib/aliases/find/find.aliases.sh | 8 +- lib/aliases/gcloud/README.md | 2 +- lib/aliases/gcloud/gcloud.aliases.sh | 8 +- lib/aliases/git/README.md | 2 +- lib/aliases/git/git.aliases.sh | 6 +- lib/aliases/gnu/README.md | 2 +- lib/aliases/gnu/gnucoreutils-aliases.sh | 4 +- lib/aliases/heroku/README.md | 2 +- lib/aliases/heroku/heroku.aliases.sh | 6 +- lib/aliases/interactive/README.md | 2 +- .../interactive/interactive.aliases.sh | 6 +- lib/aliases/jekyll/README.md | 2 +- lib/aliases/jekyll/jekyll.aliases.sh | 10 +- lib/aliases/list/README.md | 2 +- lib/aliases/list/list.aliases.sh | 6 +- lib/aliases/macOS/README.md | 2 +- lib/aliases/macOS/macos.aliases.sh | 6 +- lib/aliases/make/README.md | 2 +- lib/aliases/make/make.aliases.sh | 6 +- lib/aliases/mkdir/README.md | 2 +- lib/aliases/mkdir/mkdir.aliases.sh | 6 +- lib/aliases/npm/README.md | 2 +- lib/aliases/npm/npm.aliases.sh | 6 +- lib/aliases/permission/README.md | 2 +- lib/aliases/permission/permission.aliases.sh | 6 +- lib/aliases/pnpm/README.md | 2 +- lib/aliases/pnpm/pnpm.aliases.sh | 6 +- lib/aliases/ps/README.md | 2 +- lib/aliases/ps/ps.aliases.sh | 6 +- lib/aliases/rsync/README.md | 2 +- lib/aliases/rsync/rsync.aliases.sh | 6 +- lib/aliases/rust/README.md | 2 +- lib/aliases/rust/rust.aliases.sh | 6 +- lib/aliases/subversion/README.md | 2 +- lib/aliases/subversion/subversion.aliases.sh | 6 +- lib/aliases/sudo/README.md | 2 +- lib/aliases/sudo/sudo.aliases.sh | 6 +- lib/aliases/tmux/README.md | 2 +- lib/aliases/tmux/tmux.aliases.sh | 6 +- lib/aliases/update/README.md | 2 +- lib/aliases/update/update.aliases.sh | 6 +- lib/aliases/uuid/README.md | 2 +- lib/aliases/uuid/uuid.aliases.sh | 6 +- lib/aliases/wget/README.md | 2 +- lib/aliases/wget/wget.aliases.sh | 6 +- lib/configurations.sh | 4 +- lib/configurations/README.md | 2 +- lib/configurations/bash/bashrc | 8 +- lib/configurations/curl/curlrc | 6 +- lib/configurations/default/color.sh | 6 +- lib/configurations/default/constants.sh | 8 +- lib/configurations/default/editor.sh | 6 +- lib/configurations/default/prompt.sh | 6 +- lib/configurations/input/inputrc | 6 +- lib/configurations/nano/nanorc | 6 +- lib/configurations/profile/profile | 6 +- lib/configurations/prompt/prompt | 106 ++++++++++++++++++ lib/configurations/tmux/default | 6 +- lib/configurations/tmux/display | 6 +- lib/configurations/tmux/linux | 6 +- lib/configurations/tmux/navigation | 6 +- lib/configurations/tmux/panes | 6 +- lib/configurations/tmux/theme | 8 +- lib/configurations/tmux/tmux | 6 +- lib/configurations/vim/vimrc | 2 +- lib/configurations/wget/wgetrc | 6 +- lib/configurations/zsh/zshrc | 6 +- lib/functions.sh | 4 +- lib/functions/README.md | 2 +- lib/functions/cdls.sh | 6 +- lib/functions/curlheader.sh | 6 +- lib/functions/curlstatus.sh | 6 +- lib/functions/curltime.sh | 10 +- lib/functions/encode64.sh | 6 +- lib/functions/environment.sh | 6 +- lib/functions/extract.sh | 6 +- lib/functions/freespace.sh | 6 +- lib/functions/genpwd.sh | 10 +- lib/functions/goto.sh | 6 +- lib/functions/hidehiddenfiles.sh | 6 +- lib/functions/hostinfo.sh | 6 +- lib/functions/hstats.sh | 6 +- lib/functions/httpdebug.sh | 6 +- lib/functions/keygen.sh | 6 +- lib/functions/last.sh | 6 +- lib/functions/logout.sh | 6 +- lib/functions/lowercase.sh | 6 +- lib/functions/matrix.sh | 6 +- lib/functions/mount_read_only.sh | 6 +- lib/functions/myproc.sh | 6 +- lib/functions/prependpath.sh | 6 +- lib/functions/ql.sh | 6 +- lib/functions/rd.sh | 6 +- lib/functions/remove_disk.sh | 6 +- lib/functions/ren.sh | 6 +- lib/functions/showhiddenfiles.sh | 6 +- lib/functions/size.sh | 6 +- lib/functions/stopwatch.sh | 6 +- lib/functions/uppercase.sh | 6 +- lib/functions/view-source.sh | 6 +- lib/functions/vscode.sh | 6 +- lib/functions/whoisport.sh | 6 +- lib/functions/zipf.sh | 6 +- lib/history.sh | 4 +- lib/paths.sh | 4 +- lib/paths/ant/ant.paths.sh | 6 +- lib/paths/default/default.paths.sh | 6 +- lib/paths/homebrew/homebrew.paths.sh | 6 +- lib/paths/java/java.paths.sh | 6 +- lib/paths/maven/maven.paths.sh | 6 +- lib/paths/node/node.paths.sh | 6 +- lib/paths/nvm/nvm.paths.sh | 6 +- lib/paths/pnpm/pnpm.paths.sh | 6 +- lib/paths/python/python.paths.sh | 6 +- lib/paths/ruby/ruby.paths.sh | 6 +- lib/paths/tmux/tmux.paths.sh | 6 +- package.json | 2 +- scripts/backup.sh | 6 +- scripts/banner.sh | 6 +- scripts/build.sh | 6 +- scripts/clean.sh | 6 +- scripts/compile.sh | 6 +- scripts/copy.sh | 6 +- scripts/dotfiles.sh | 6 +- scripts/download.sh | 6 +- scripts/help.sh | 6 +- scripts/ssh.sh | 6 +- scripts/unpack.sh | 6 +- 167 files changed, 505 insertions(+), 399 deletions(-) delete mode 100644 "Icon\r" create mode 100644 lib/configurations/prompt/prompt diff --git a/.editorconfig b/.editorconfig index 2a170a69..fecdc129 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - https://dotfiles.io -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - https://dotfiles.io +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # diff --git a/.github/CODE-OF-CONDUCT.md b/.github/CODE-OF-CONDUCT.md index 9077040b..5ae161d0 100644 --- a/.github/CODE-OF-CONDUCT.md +++ b/.github/CODE-OF-CONDUCT.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6e9094c4..0e902530 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 78240745..9fb8ba0f 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/.gitignore b/.gitignore index 0c5a928b..e54627b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Exclude Directories and package diff --git a/.npmrc b/.npmrc index e7a03060..1a829aa1 100644 --- a/.npmrc +++ b/.npmrc @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ; registry=https://npm.pkg.github.com/sebastienrousseau diff --git a/COPYRIGHT b/COPYRIGHT index 1d79de77..5677993b 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,5 +1,5 @@ /* -* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT diff --git "a/Icon\r" "b/Icon\r" deleted file mode 100644 index e69de29b..00000000 diff --git a/Makefile b/Makefile index 34731743..8a259f1f 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ #!/usr/bin/env make -f -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT .DEFAULT_GOAL := help diff --git a/README.md b/README.md index 7e3d3e28..d1b2deeb 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 @@ -53,7 +53,7 @@ productivity no matter where you work. [![Getting Started][getting_started]][getting-started-url] -[![Download Dotfiles v0.2.468][download_button]][12] +[![Download Dotfiles v0.2.469][download_button]][12] @@ -168,7 +168,7 @@ To read the documentation for Dotfiles, please visit: ### 1️⃣ Download Dotfiles -You can download the latest version (v0.2.468) with the following +You can download the latest version (v0.2.469) with the following options: - [**Manual download**][24] - **The easiest way to install Dotfiles.** @@ -364,7 +364,7 @@ Apache License (Version 2.0). [09]: https://www.deepin.org/en/ "Deepin" [10]: https://devuan.org/ "Devuan" [11]: https://github.com/sebastienrousseau/dotfiles/docs "Documentation" -[12]: https://github.com/sebastienrousseau/dotfiles/archive/refs/tags/v0.2.468.tar.gz "Download Dotfiles v0.2.468" +[12]: https://github.com/sebastienrousseau/dotfiles/archive/refs/tags/v0.2.469.tar.gz "Download Dotfiles v0.2.469" [13]: https://github.com/sebastienrousseau/dotfiles/network/members "List of members" [14]: https://github.com/sebastienrousseau/dotfiles/graphs/contributors "List of contributors" [15]: https://git-scm.com/ "Git" diff --git a/bin/backup.js b/bin/backup.js index e571d945..b1b07e36 100644 --- a/bin/backup.js +++ b/bin/backup.js @@ -1,5 +1,5 @@ /** -* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT diff --git a/bin/constants.js b/bin/constants.js index 3e52d165..82014ccd 100644 --- a/bin/constants.js +++ b/bin/constants.js @@ -1,13 +1,13 @@ /** -* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT */ // πŸ…²πŸ…ΎπŸ…½πŸ†‚πŸ†ƒπŸ…°πŸ…½πŸ†ƒπŸ†‚ - Constants. -const version = "dotfiles-0.2.468.tgz"; -const dotfile = "https://registry.npmjs.org/@wwdseb/dotfiles/-/dotfiles-0.2.468.tgz"; +const version = "dotfiles-0.2.469.tgz"; +const dotfile = "https://registry.npmjs.org/@wwdseb/dotfiles/-/dotfiles-0.2.469.tgz"; const aliases = [ ".bashrc", diff --git a/bin/copy.js b/bin/copy.js index 250142db..51a1c1a4 100644 --- a/bin/copy.js +++ b/bin/copy.js @@ -1,5 +1,5 @@ /** -* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT diff --git a/bin/dotfiles.js b/bin/dotfiles.js index fd5cf48c..b21fd6e1 100644 --- a/bin/dotfiles.js +++ b/bin/dotfiles.js @@ -1,5 +1,5 @@ /** -* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT diff --git a/bin/download.js b/bin/download.js index 1e17e67d..e8584b52 100644 --- a/bin/download.js +++ b/bin/download.js @@ -1,5 +1,5 @@ /** - * πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - + * πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT diff --git a/bin/index.js b/bin/index.js index a326b664..99637b89 100644 --- a/bin/index.js +++ b/bin/index.js @@ -1,5 +1,5 @@ /** -* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT diff --git a/bin/transfer.js b/bin/transfer.js index b37d6a78..2a9273a8 100644 --- a/bin/transfer.js +++ b/bin/transfer.js @@ -1,5 +1,5 @@ /** -* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT diff --git a/bin/unpack.js b/bin/unpack.js index 937e40dd..c5477bc1 100644 --- a/bin/unpack.js +++ b/bin/unpack.js @@ -1,5 +1,5 @@ /** -* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +* πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - * Made with β™₯ in London, UK by @wwdseb * Copyright (c) 2015-2024. All rights reserved * License: MIT diff --git a/lib/aliases.sh b/lib/aliases.sh index b1f7cb3a..8a4fe879 100644 --- a/lib/aliases.sh +++ b/lib/aliases.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell aliases # Website: https://dotfiles.io # License: MIT diff --git a/lib/aliases/README.md b/lib/aliases/README.md index 87caedec..881abe61 100644 --- a/lib/aliases/README.md +++ b/lib/aliases/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/archives/README.md b/lib/aliases/archives/README.md index 4515b4bd..be67ca05 100644 --- a/lib/aliases/archives/README.md +++ b/lib/aliases/archives/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/archives/archives.aliases.sh b/lib/aliases/archives/archives.aliases.sh index 501f4019..f85117c2 100644 --- a/lib/aliases/archives/archives.aliases.sh +++ b/lib/aliases/archives/archives.aliases.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: archives.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: # This script defines aliases for common archive operations. It provides # shortcuts for compressing and extracting various types of archive files. diff --git a/lib/aliases/cd/README.md b/lib/aliases/cd/README.md index 6041dc1d..c3d0a135 100644 --- a/lib/aliases/cd/README.md +++ b/lib/aliases/cd/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Designed to seamlessly enhance your shell environment 🐚 diff --git a/lib/aliases/cd/cd.aliases.sh b/lib/aliases/cd/cd.aliases.sh index a7223a7a..98bbaaf9 100644 --- a/lib/aliases/cd/cd.aliases.sh +++ b/lib/aliases/cd/cd.aliases.sh @@ -7,7 +7,7 @@ # Description: Enhanced `cd` command aliases with checks, functions, and customization. # License: MIT # Script: cd.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Website: https://dotfiles.io # Usage: diff --git a/lib/aliases/chmod/README.md b/lib/aliases/chmod/README.md index 170ca7b9..fad14389 100644 --- a/lib/aliases/chmod/README.md +++ b/lib/aliases/chmod/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/chmod/chmod.aliases.sh b/lib/aliases/chmod/chmod.aliases.sh index d71f8c5b..6ded927a 100644 --- a/lib/aliases/chmod/chmod.aliases.sh +++ b/lib/aliases/chmod/chmod.aliases.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: chmod.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Enhanced chmod command aliases with safety features, input validation, and structured organization. # Website: https://dotfiles.io # License: MIT diff --git a/lib/aliases/clear/README.md b/lib/aliases/clear/README.md index 7bdbf75d..433e97c8 100644 --- a/lib/aliases/clear/README.md +++ b/lib/aliases/clear/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/clear/clear.aliases.sh b/lib/aliases/clear/clear.aliases.sh index 56fecdfa..3ee8969b 100644 --- a/lib/aliases/clear/clear.aliases.sh +++ b/lib/aliases/clear/clear.aliases.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: clear.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Enhances terminal interaction with aliases for clearing the screen, # navigating directories, and displaying directory contents in an organized manner. # Website: https://dotfiles.io diff --git a/lib/aliases/configuration/README.md b/lib/aliases/configuration/README.md index e382446f..51e93bfe 100644 --- a/lib/aliases/configuration/README.md +++ b/lib/aliases/configuration/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/configuration/configuration.aliases.sh b/lib/aliases/configuration/configuration.aliases.sh index 6566e6c0..1a93a3b7 100644 --- a/lib/aliases/configuration/configuration.aliases.sh +++ b/lib/aliases/configuration/configuration.aliases.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: configuration.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Script containing aliases to open configuration files in default # editor # Website: https://dotfiles.io diff --git a/lib/aliases/default/README.md b/lib/aliases/default/README.md index 3586b957..e7c42d8b 100644 --- a/lib/aliases/default/README.md +++ b/lib/aliases/default/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/default/default.aliases.sh b/lib/aliases/default/default.aliases.sh index 8b09b300..51649e8c 100644 --- a/lib/aliases/default/default.aliases.sh +++ b/lib/aliases/default/default.aliases.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: default.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Script containing default shell aliases # Website: https://dotfiles.io # License: MIT diff --git a/lib/aliases/dig/README.md b/lib/aliases/dig/README.md index 103023b7..c3c9069d 100644 --- a/lib/aliases/dig/README.md +++ b/lib/aliases/dig/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/dig/dig.aliases.sh b/lib/aliases/dig/dig.aliases.sh index c9ac14c1..5cf8d9c6 100644 --- a/lib/aliases/dig/dig.aliases.sh +++ b/lib/aliases/dig/dig.aliases.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Script: dig.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Website: https://dotfiles.io # πŸ…³πŸ…ΈπŸ…Ά πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/disk-usage/README.md b/lib/aliases/disk-usage/README.md index a890f55b..14f55c37 100644 --- a/lib/aliases/disk-usage/README.md +++ b/lib/aliases/disk-usage/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/disk-usage/du.aliases.sh b/lib/aliases/disk-usage/du.aliases.sh index 8e74ae92..786b0f60 100644 --- a/lib/aliases/disk-usage/du.aliases.sh +++ b/lib/aliases/disk-usage/du.aliases.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash # Author: Sebastien Rousseau -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Sets Disk Usage Aliases # License: MIT # Script: du.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Website: https://dotfiles.io # πŸ…³πŸ…ΈπŸ†‚πŸ…Ί πŸ†„πŸ†‚πŸ…°πŸ…ΆπŸ…΄ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/editor/README.md b/lib/aliases/editor/README.md index fa82b564..ea8ca86b 100644 --- a/lib/aliases/editor/README.md +++ b/lib/aliases/editor/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/editor/editor.aliases.sh b/lib/aliases/editor/editor.aliases.sh index 402b51b9..bcc6c908 100644 --- a/lib/aliases/editor/editor.aliases.sh +++ b/lib/aliases/editor/editor.aliases.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Script: editor.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Website: https://dotfiles.io # πŸ…΄πŸ…³πŸ…ΈπŸ†ƒπŸ…ΎπŸ† πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/find/README.md b/lib/aliases/find/README.md index 74ee3f00..36a337ac 100644 --- a/lib/aliases/find/README.md +++ b/lib/aliases/find/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/find/find.aliases.sh b/lib/aliases/find/find.aliases.sh index 115ecfef..a15e2ed4 100644 --- a/lib/aliases/find/find.aliases.sh +++ b/lib/aliases/find/find.aliases.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Script: find.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Website: https://dotfiles.io # πŸ…΅πŸ…ΈπŸ…½πŸ…³ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/gcloud/README.md b/lib/aliases/gcloud/README.md index 19b24c01..26418bb3 100644 --- a/lib/aliases/gcloud/README.md +++ b/lib/aliases/gcloud/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/gcloud/gcloud.aliases.sh b/lib/aliases/gcloud/gcloud.aliases.sh index 00ea11ee..975c3c7f 100644 --- a/lib/aliases/gcloud/gcloud.aliases.sh +++ b/lib/aliases/gcloud/gcloud.aliases.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Script: gcloud.aliases.sh -# Version: 0.2.468 +# Version: 0.2.469 # Website: https://dotfiles.io # πŸ…ΆπŸ…²πŸ…»πŸ…ΎπŸ†„πŸ…³ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - Google Cloud aliases. diff --git a/lib/aliases/git/README.md b/lib/aliases/git/README.md index 9635cdad..5be34577 100644 --- a/lib/aliases/git/README.md +++ b/lib/aliases/git/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/git/git.aliases.sh b/lib/aliases/git/git.aliases.sh index ac83c998..71233729 100644 --- a/lib/aliases/git/git.aliases.sh +++ b/lib/aliases/git/git.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΆπŸ…ΈπŸ†ƒ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - Git aliases. diff --git a/lib/aliases/gnu/README.md b/lib/aliases/gnu/README.md index 0078e77b..a1510e26 100644 --- a/lib/aliases/gnu/README.md +++ b/lib/aliases/gnu/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/gnu/gnucoreutils-aliases.sh b/lib/aliases/gnu/gnucoreutils-aliases.sh index afa1accf..09527caa 100644 --- a/lib/aliases/gnu/gnucoreutils-aliases.sh +++ b/lib/aliases/gnu/gnucoreutils-aliases.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau # Copyright (c)' 2015-2023. All rights reserved # License: MIT diff --git a/lib/aliases/heroku/README.md b/lib/aliases/heroku/README.md index 7c3f301d..94859ed4 100644 --- a/lib/aliases/heroku/README.md +++ b/lib/aliases/heroku/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/heroku/heroku.aliases.sh b/lib/aliases/heroku/heroku.aliases.sh index a1ebea69..4d278ec2 100644 --- a/lib/aliases/heroku/heroku.aliases.sh +++ b/lib/aliases/heroku/heroku.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…·πŸ…΄πŸ†πŸ…ΎπŸ…ΊπŸ†„ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - Heroku aliases. diff --git a/lib/aliases/interactive/README.md b/lib/aliases/interactive/README.md index fe83d1b5..4fe85389 100644 --- a/lib/aliases/interactive/README.md +++ b/lib/aliases/interactive/README.md @@ -9,7 +9,7 @@ align="right" -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/interactive/interactive.aliases.sh b/lib/aliases/interactive/interactive.aliases.sh index 95542a00..6304c12c 100644 --- a/lib/aliases/interactive/interactive.aliases.sh +++ b/lib/aliases/interactive/interactive.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΈπŸ…½πŸ†ƒπŸ…΄πŸ†πŸ…°πŸ…²πŸ†ƒπŸ…ΈπŸ†…πŸ…΄ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/jekyll/README.md b/lib/aliases/jekyll/README.md index e1b08da7..c7821995 100644 --- a/lib/aliases/jekyll/README.md +++ b/lib/aliases/jekyll/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/jekyll/jekyll.aliases.sh b/lib/aliases/jekyll/jekyll.aliases.sh index 51f4fd2a..522bb076 100644 --- a/lib/aliases/jekyll/jekyll.aliases.sh +++ b/lib/aliases/jekyll/jekyll.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΉπŸ…΄πŸ…ΊπŸ†ˆπŸ…»πŸ…» πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ @@ -13,8 +13,8 @@ if command -v jekyll &>/dev/null; then # 1.1 Jekyll development aliases. # 1.2 Jekyll release aliases. # - # Made with β™₯ in London, UK by @wwdseb - # Copyright (c) 2015-2024. All rights reserved + # Made with β™₯ in London, UK by Sebastien Rousseau + # Copyright (c) 2015-2025. All rights reserved # Licensed under the MIT license # diff --git a/lib/aliases/list/README.md b/lib/aliases/list/README.md index 17fe07fc..32051dab 100644 --- a/lib/aliases/list/README.md +++ b/lib/aliases/list/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/list/list.aliases.sh b/lib/aliases/list/list.aliases.sh index 90e82238..97dddc27 100644 --- a/lib/aliases/list/list.aliases.sh +++ b/lib/aliases/list/list.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…»πŸ…ΈπŸ†‚πŸ†ƒ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/macOS/README.md b/lib/aliases/macOS/README.md index c3b7a1d7..d0225837 100644 --- a/lib/aliases/macOS/README.md +++ b/lib/aliases/macOS/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/macOS/macos.aliases.sh b/lib/aliases/macOS/macos.aliases.sh index 0147778c..552e9344 100644 --- a/lib/aliases/macOS/macos.aliases.sh +++ b/lib/aliases/macOS/macos.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΌπŸ…°πŸ…²πŸ…ΎπŸ†‚ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/make/README.md b/lib/aliases/make/README.md index 41a1d56f..bae29b48 100644 --- a/lib/aliases/make/README.md +++ b/lib/aliases/make/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/make/make.aliases.sh b/lib/aliases/make/make.aliases.sh index 02ddbef8..284aeb2f 100644 --- a/lib/aliases/make/make.aliases.sh +++ b/lib/aliases/make/make.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΌπŸ…°πŸ…ΊπŸ…΄ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/mkdir/README.md b/lib/aliases/mkdir/README.md index 4bbb3575..70aa7fd4 100644 --- a/lib/aliases/mkdir/README.md +++ b/lib/aliases/mkdir/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/mkdir/mkdir.aliases.sh b/lib/aliases/mkdir/mkdir.aliases.sh index 2a9e7103..5277e266 100644 --- a/lib/aliases/mkdir/mkdir.aliases.sh +++ b/lib/aliases/mkdir/mkdir.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΌπŸ…°πŸ…ΊπŸ…΄πŸ…³πŸ…ΈπŸ† πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/npm/README.md b/lib/aliases/npm/README.md index ea482703..bf1c63af 100644 --- a/lib/aliases/npm/README.md +++ b/lib/aliases/npm/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/npm/npm.aliases.sh b/lib/aliases/npm/npm.aliases.sh index 5c488109..cff64502 100644 --- a/lib/aliases/npm/npm.aliases.sh +++ b/lib/aliases/npm/npm.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…½πŸ…ΏπŸ…Ό πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/permission/README.md b/lib/aliases/permission/README.md index f4246e60..1c46e846 100644 --- a/lib/aliases/permission/README.md +++ b/lib/aliases/permission/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/permission/permission.aliases.sh b/lib/aliases/permission/permission.aliases.sh index 8474c281..a8fbab05 100644 --- a/lib/aliases/permission/permission.aliases.sh +++ b/lib/aliases/permission/permission.aliases.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - https://dotfiles.io -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - https://dotfiles.io +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΏπŸ…΄πŸ†πŸ…ΌπŸ…ΈπŸ†‚πŸ†‚πŸ…ΈπŸ…ΎπŸ…½ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/pnpm/README.md b/lib/aliases/pnpm/README.md index ac677d9e..01c1e3d5 100644 --- a/lib/aliases/pnpm/README.md +++ b/lib/aliases/pnpm/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/pnpm/pnpm.aliases.sh b/lib/aliases/pnpm/pnpm.aliases.sh index 951a900e..bb538920 100644 --- a/lib/aliases/pnpm/pnpm.aliases.sh +++ b/lib/aliases/pnpm/pnpm.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΏπŸ…½πŸ…ΏπŸ…Ό πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/ps/README.md b/lib/aliases/ps/README.md index 56e5fc10..b88b9e4d 100644 --- a/lib/aliases/ps/README.md +++ b/lib/aliases/ps/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/ps/ps.aliases.sh b/lib/aliases/ps/ps.aliases.sh index 3930b4f3..6ab4f422 100644 --- a/lib/aliases/ps/ps.aliases.sh +++ b/lib/aliases/ps/ps.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΏπŸ†‚ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/rsync/README.md b/lib/aliases/rsync/README.md index 34e92341..9d05507a 100644 --- a/lib/aliases/rsync/README.md +++ b/lib/aliases/rsync/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/rsync/rsync.aliases.sh b/lib/aliases/rsync/rsync.aliases.sh index ac500df3..69f36a26 100644 --- a/lib/aliases/rsync/rsync.aliases.sh +++ b/lib/aliases/rsync/rsync.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ†πŸ†‚πŸ†ˆπŸ…½πŸ…² πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/rust/README.md b/lib/aliases/rust/README.md index fe4b7222..bd82e3c2 100644 --- a/lib/aliases/rust/README.md +++ b/lib/aliases/rust/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/rust/rust.aliases.sh b/lib/aliases/rust/rust.aliases.sh index cd6f5451..a8319a43 100644 --- a/lib/aliases/rust/rust.aliases.sh +++ b/lib/aliases/rust/rust.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…²πŸ…°πŸ†πŸ…ΆπŸ…Ύ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/subversion/README.md b/lib/aliases/subversion/README.md index 4f5399f6..cf29ce90 100644 --- a/lib/aliases/subversion/README.md +++ b/lib/aliases/subversion/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/subversion/subversion.aliases.sh b/lib/aliases/subversion/subversion.aliases.sh index 501d8c7f..7e61d526 100644 --- a/lib/aliases/subversion/subversion.aliases.sh +++ b/lib/aliases/subversion/subversion.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ†‚πŸ†„πŸ…±πŸ†…πŸ…΄πŸ†πŸ†‚πŸ…ΈπŸ…ΎπŸ…½ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/sudo/README.md b/lib/aliases/sudo/README.md index c64dfe33..21607928 100644 --- a/lib/aliases/sudo/README.md +++ b/lib/aliases/sudo/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/sudo/sudo.aliases.sh b/lib/aliases/sudo/sudo.aliases.sh index 26bde2da..7895154e 100644 --- a/lib/aliases/sudo/sudo.aliases.sh +++ b/lib/aliases/sudo/sudo.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ†‚πŸ†„πŸ…³πŸ…Ύ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/tmux/README.md b/lib/aliases/tmux/README.md index fd48b716..c5f71bda 100644 --- a/lib/aliases/tmux/README.md +++ b/lib/aliases/tmux/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/tmux/tmux.aliases.sh b/lib/aliases/tmux/tmux.aliases.sh index e6244444..94991ea8 100644 --- a/lib/aliases/tmux/tmux.aliases.sh +++ b/lib/aliases/tmux/tmux.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ†ƒπŸ…ΌπŸ†„πŸ†‡ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/update/README.md b/lib/aliases/update/README.md index 330d9006..359c6519 100644 --- a/lib/aliases/update/README.md +++ b/lib/aliases/update/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/update/update.aliases.sh b/lib/aliases/update/update.aliases.sh index 53ed2f81..5e679ac6 100644 --- a/lib/aliases/update/update.aliases.sh +++ b/lib/aliases/update/update.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ†„πŸ…ΏπŸ…³πŸ…°πŸ†ƒπŸ…΄ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/uuid/README.md b/lib/aliases/uuid/README.md index c69438d8..ee2860c9 100644 --- a/lib/aliases/uuid/README.md +++ b/lib/aliases/uuid/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/uuid/uuid.aliases.sh b/lib/aliases/uuid/uuid.aliases.sh index 5d0f1031..802a444a 100644 --- a/lib/aliases/uuid/uuid.aliases.sh +++ b/lib/aliases/uuid/uuid.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ†„πŸ†„πŸ…ΈπŸ…³ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/aliases/wget/README.md b/lib/aliases/wget/README.md index 0b67703b..bb241351 100644 --- a/lib/aliases/wget/README.md +++ b/lib/aliases/wget/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/aliases/wget/wget.aliases.sh b/lib/aliases/wget/wget.aliases.sh index c8b49f39..fd6c39d6 100644 --- a/lib/aliases/wget/wget.aliases.sh +++ b/lib/aliases/wget/wget.aliases.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ††πŸ…ΆπŸ…΄πŸ†ƒ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ diff --git a/lib/configurations.sh b/lib/configurations.sh index de4cafde..94138240 100644 --- a/lib/configurations.sh +++ b/lib/configurations.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: configurations.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell configurations # Website: https://dotfiles.io # License: MIT diff --git a/lib/configurations/README.md b/lib/configurations/README.md index 0d5d6c9d..abd7cfbf 100644 --- a/lib/configurations/README.md +++ b/lib/configurations/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/configurations/bash/bashrc b/lib/configurations/bash/bashrc index a613b59a..04949740 100644 --- a/lib/configurations/bash/bashrc +++ b/lib/configurations/bash/bashrc @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†…πŸ…°πŸ†πŸ…ΈπŸ…°πŸ…±πŸ…»πŸ…΄πŸ†‚ - Set Dotfiles variable. @@ -17,7 +17,7 @@ USER=$(whoami) # current user name. ## πŸ…΄πŸ†‡πŸ…ΏπŸ…ΎπŸ†πŸ†ƒπŸ†‚ - Export the variables. export ARCHFLAGS="-arch ${OS_ARCH}" # archflags for the current machine. -export DOTFILES_VERSION='0.2.468' # version of the dotfiles. +export DOTFILES_VERSION='0.2.469' # version of the dotfiles. export DOTFILES="${HOME}"/.dotfiles/lib # path to the cross plaform dotfiles. export HOSTNAME=${HOSTNAME} # hostname of the machine. export INPUTRC=${INPUTRC} # set INPUTRC (so that .inputrc is respected) diff --git a/lib/configurations/curl/curlrc b/lib/configurations/curl/curlrc index 5bccb2a7..1dc2d9bc 100644 --- a/lib/configurations/curl/curlrc +++ b/lib/configurations/curl/curlrc @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…²πŸ†„πŸ†πŸ…» πŸ…²πŸ…ΎπŸ…½πŸ…΅πŸ…ΈπŸ…Ά - cURL configuration options. diff --git a/lib/configurations/default/color.sh b/lib/configurations/default/color.sh index 78a5797f..2115e0f9 100644 --- a/lib/configurations/default/color.sh +++ b/lib/configurations/default/color.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…²πŸ…ΎπŸ…»πŸ…ΎπŸ†πŸ†‚ diff --git a/lib/configurations/default/constants.sh b/lib/configurations/default/constants.sh index 3b0a7ae4..7d42f903 100755 --- a/lib/configurations/default/constants.sh +++ b/lib/configurations/default/constants.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ πŸ†…πŸ…°πŸ†πŸ…ΈπŸ…°πŸ…±πŸ…»πŸ…΄πŸ†‚ - Set Dotfiles variables. @@ -11,7 +11,7 @@ DF=".dotfiles/" # Dotfiles. DF_DIR="${HOME}/.dotfiles/" # Dotfiles directory. DF_BACKUPDIR="${HOME}/dotfiles_backup/" # Backup directory. DF_DOWNLOADDIR="${HOME}/Downloads" # Download directory. -DF_VERSION="0.2.468" # Dotfiles Version number. +DF_VERSION="0.2.469" # Dotfiles Version number. # DF_TIMESTAMP="$(date +%Y-%m-%d_%H-%M-%S)" # Timestamp for backup directory. export DF diff --git a/lib/configurations/default/editor.sh b/lib/configurations/default/editor.sh index a168493f..e8bc2648 100644 --- a/lib/configurations/default/editor.sh +++ b/lib/configurations/default/editor.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT cmd_vim=$(command -v vim) diff --git a/lib/configurations/default/prompt.sh b/lib/configurations/default/prompt.sh index 1a02adb7..dd7041d1 100644 --- a/lib/configurations/default/prompt.sh +++ b/lib/configurations/default/prompt.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†‚πŸ…·πŸ…΄πŸ…»πŸ…» diff --git a/lib/configurations/input/inputrc b/lib/configurations/input/inputrc index ff36c07f..27896aaa 100644 --- a/lib/configurations/input/inputrc +++ b/lib/configurations/input/inputrc @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΈπŸ…½πŸ…ΏπŸ†„πŸ†ƒπŸ†πŸ…² - Completion options. diff --git a/lib/configurations/nano/nanorc b/lib/configurations/nano/nanorc index 9601daf3..b5806f86 100644 --- a/lib/configurations/nano/nanorc +++ b/lib/configurations/nano/nanorc @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…½πŸ…°πŸ…½πŸ…ΎπŸ†πŸ…² diff --git a/lib/configurations/profile/profile b/lib/configurations/profile/profile index 31529513..99c6191a 100644 --- a/lib/configurations/profile/profile +++ b/lib/configurations/profile/profile @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # ~/.profile: executed by the command interpreter for login shells. diff --git a/lib/configurations/prompt/prompt b/lib/configurations/prompt/prompt new file mode 100644 index 00000000..c61b4865 --- /dev/null +++ b/lib/configurations/prompt/prompt @@ -0,0 +1,106 @@ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Works with Zsh on macOS and Linux +# Made with β™₯ in London, UK by Sebastien Rousseau +# License: MIT + +## PROMPT SETTINGS +setopt PROMPT_SUBST + +# Color definitions +GREY='%F{242}' +RED='%F{#FF5C57}' +YELLOW='%F{#F3F99D}' +BLUE='%F{#57C7FF}' +MAGENTA='%F{#FF6AC1}' +RESET='%f' + +# Load datetime module for EPOCHREALTIME (if available) +zmodload zsh/datetime 2>/dev/null + +# Timer variables +typeset -g cmd_timestamp=0 + +# Function: Display the current directory +current_dir() { + echo "${BLUE}%~${RESET}" +} + +# Function: Display virtual environment (if active) +virtualenv_info() { + [[ -n "$VIRTUAL_ENV" ]] && echo "${GREY}($(basename "$VIRTUAL_ENV"))${RESET} " +} + +# Function: Git status +git_status() { + # Check if we're in a Git repository + command git rev-parse --is-inside-work-tree &>/dev/null || return 0 + + # Get current branch name or commit hash + local git_branch + git_branch="$(command git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)" || return 0 + + # Check for uncommitted changes + local status_symbol="" + command git diff --quiet --ignore-submodules HEAD &>/dev/null || status_symbol="*" + + # Determine ahead/behind status + local behind=0 ahead=0 + if command git rev-list --count --left-right '@{upstream}...HEAD' &>/dev/null; then + IFS=$' \t' read -r behind ahead < <(git rev-list --count --left-right '@{upstream}...HEAD' 2>/dev/null) + fi + + local arrows="" + (( ahead > 0 )) && arrows+="⇑" + (( behind > 0 )) && arrows+="⇣" + + echo "${GREY}${git_branch}${status_symbol}${arrows}${RESET}" +} + +# Function: Prompt symbol (βœ“ if last command succeeded, βœ— if failed) +prompt_symbol() { + echo "%(?.${MAGENTA}.${RED})❯${RESET}" +} + +# Preexec: record the start time of the command +preexec() { + cmd_timestamp=$EPOCHREALTIME +} + +# Precmd: update RPROMPT with timing and current time +precmd() { + local timer_display="" + if (( cmd_timestamp > 0 )); then + local now=$EPOCHREALTIME + local elapsed=$(( now - cmd_timestamp )) + (( elapsed >= 5 )) && timer_display="${YELLOW}$(printf "%.0fs" $elapsed)${RESET} " + cmd_timestamp=0 + fi + + export RPROMPT="${timer_display}${GREY}%T${RESET}" +} + +# Set the main prompt +setopt PROMPT_CR +setopt PROMPT_SP + +# Main prompt +prompt() { + +local venv_info +venv_info="$(virtualenv_info)" +local curr_dir +curr_dir="$(current_dir)" +local git_stat +git_stat="$(git_status)" +local prompt_sym +prompt_sym="$(prompt_symbol)" + +export PROMPT="${venv_info}${curr_dir} ${git_stat} +${prompt_sym} " + +} + +# Conditionally source additional prompt configuration if it exists +if [[ -f "$HOME/.dotfiles/lib/configurations/prompt/prompt" ]]; then + source "$HOME/.dotfiles/lib/configurations/prompt/prompt" +fi diff --git a/lib/configurations/tmux/default b/lib/configurations/tmux/default index 6ace70c0..3bf44217 100644 --- a/lib/configurations/tmux/default +++ b/lib/configurations/tmux/default @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…³πŸ…΄πŸ…΅πŸ…°πŸ†„πŸ…»πŸ†ƒ diff --git a/lib/configurations/tmux/display b/lib/configurations/tmux/display index b5af08a2..9c629a4b 100644 --- a/lib/configurations/tmux/display +++ b/lib/configurations/tmux/display @@ -1,8 +1,8 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by @wwdseb +# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # License: MIT diff --git a/lib/configurations/tmux/linux b/lib/configurations/tmux/linux index 0b52bfa3..c90af530 100644 --- a/lib/configurations/tmux/linux +++ b/lib/configurations/tmux/linux @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…»πŸ…ΈπŸ…½πŸ†„πŸ†‡ πŸ…ΎπŸ…½πŸ…»πŸ†ˆ diff --git a/lib/configurations/tmux/navigation b/lib/configurations/tmux/navigation index d94103ea..3d2e5762 100644 --- a/lib/configurations/tmux/navigation +++ b/lib/configurations/tmux/navigation @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…½πŸ…°πŸ†…πŸ…ΈπŸ…ΆπŸ…°πŸ†ƒπŸ…ΈπŸ…ΎπŸ…½ diff --git a/lib/configurations/tmux/panes b/lib/configurations/tmux/panes index 1fba357c..c2c2a9c0 100644 --- a/lib/configurations/tmux/panes +++ b/lib/configurations/tmux/panes @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…ΏπŸ…°πŸ…½πŸ…΄πŸ†‚ diff --git a/lib/configurations/tmux/theme b/lib/configurations/tmux/theme index 457577d5..e4901b78 100644 --- a/lib/configurations/tmux/theme +++ b/lib/configurations/tmux/theme @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†ƒπŸ…·πŸ…΄πŸ…ΌπŸ…΄ @@ -22,7 +22,7 @@ set -g status-justify centre # Status bar justification (left, right, centre, ab set -g status-left-length 50 # Status bar left length set -g status-right-length 50 # Status bar right length set -g status-right "#[fg=#FFFFFF] #[bg=#14222A] ⬛ #I #[bg=#007ACC] #H #[bg=#EB0000] %_d %B %I:%M%p " -set -g window-status-current-format "#[bg=#2D1681]Dotfiles (v0.2.468)" # Current window status format +set -g window-status-current-format "#[bg=#2D1681]Dotfiles (v0.2.469)" # Current window status format set -g window-status-current-style "bg=#EB0000" # Current window status style set -g window-status-separator "" # Window status separator set-window-option -g clock-mode-colour "#FFFFFF" # Clock mode color diff --git a/lib/configurations/tmux/tmux b/lib/configurations/tmux/tmux index 6fbe234b..19f5523f 100644 --- a/lib/configurations/tmux/tmux +++ b/lib/configurations/tmux/tmux @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT bind r source-file ~/.tmux.conf \; display ".tmux.conf reloaded" \; \ diff --git a/lib/configurations/vim/vimrc b/lib/configurations/vim/vimrc index 40978fa8..04439918 100644 --- a/lib/configurations/vim/vimrc +++ b/lib/configurations/vim/vimrc @@ -1,4 +1,4 @@ -" πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +" πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - " Copyright (c) Sebastien Rousseau 2022. All rights reserved " License: MIT diff --git a/lib/configurations/wget/wgetrc b/lib/configurations/wget/wgetrc index 00071348..90e6c7c1 100644 --- a/lib/configurations/wget/wgetrc +++ b/lib/configurations/wget/wgetrc @@ -1,6 +1,6 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # WGET default options diff --git a/lib/configurations/zsh/zshrc b/lib/configurations/zsh/zshrc index abcd90e3..cb8a7500 100644 --- a/lib/configurations/zsh/zshrc +++ b/lib/configurations/zsh/zshrc @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - # Made with β™₯ in London, UK by @sebastienrousseau -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†…πŸ…°πŸ†πŸ…ΈπŸ…°πŸ…±πŸ…»πŸ…΄πŸ†‚ - Set Dotfiles variable. @@ -16,7 +16,7 @@ USER_LANGUAGE="en_GB.UTF-8" # default language. ## πŸ…΄πŸ†‡πŸ…ΏπŸ…ΎπŸ†πŸ†ƒπŸ†‚ - Export the variables. export ARCHFLAGS="-arch ${OS_ARCH}" # archflags for the current machine. -export DOTFILES_VERSION='0.2.468' # version of the dotfiles. +export DOTFILES_VERSION='0.2.469' # version of the dotfiles. export DOTFILES="${HOME}"/.dotfiles/lib # path to the cross plaform dotfiles. export HOSTNAME=${HOSTNAME} # hostname of the machine. export INPUTRC=${INPUTRC} # set INPUTRC (so that .inputrc is respected) diff --git a/lib/functions.sh b/lib/functions.sh index be3c4a44..71ec243e 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: functions.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Script to load custom executable functions # Website: https://dotfiles.io # License: MIT diff --git a/lib/functions/README.md b/lib/functions/README.md index 9dd3d6c0..1b7c8cb2 100644 --- a/lib/functions/README.md +++ b/lib/functions/README.md @@ -9,7 +9,7 @@ -# Dotfiles (v0.2.468) +# Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 diff --git a/lib/functions/cdls.sh b/lib/functions/cdls.sh index 02712bdc..986a5fff 100644 --- a/lib/functions/cdls.sh +++ b/lib/functions/cdls.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Function to combine cd and ls. diff --git a/lib/functions/curlheader.sh b/lib/functions/curlheader.sh index d66d4f8d..f774807f 100644 --- a/lib/functions/curlheader.sh +++ b/lib/functions/curlheader.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## curlheader: Function to return only a specific response header or all response headers for a given URL. diff --git a/lib/functions/curlstatus.sh b/lib/functions/curlstatus.sh index aabcca1b..238dfeeb 100644 --- a/lib/functions/curlstatus.sh +++ b/lib/functions/curlstatus.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## curlstatus: Function to return only the HTTP status code for a given URL. diff --git a/lib/functions/curltime.sh b/lib/functions/curltime.sh index af89a481..24234628 100644 --- a/lib/functions/curltime.sh +++ b/lib/functions/curltime.sh @@ -1,16 +1,16 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # https://dotfiles.io # # Description: Mac OS X Dotfiles - Simply designed to fit your shell life. # -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # Licensed under the MIT license # diff --git a/lib/functions/encode64.sh b/lib/functions/encode64.sh index b54d44c5..8ea31c54 100644 --- a/lib/functions/encode64.sh +++ b/lib/functions/encode64.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # encode64: Function to encode a string to base64. diff --git a/lib/functions/environment.sh b/lib/functions/environment.sh index b74b2667..c65c69f2 100644 --- a/lib/functions/environment.sh +++ b/lib/functions/environment.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # environment: Function to detect the current environment diff --git a/lib/functions/extract.sh b/lib/functions/extract.sh index 8188bc69..9430b4fc 100644 --- a/lib/functions/extract.sh +++ b/lib/functions/extract.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # extract: Function to extract most know archives with one command diff --git a/lib/functions/freespace.sh b/lib/functions/freespace.sh index deca6c48..c125ab62 100644 --- a/lib/functions/freespace.sh +++ b/lib/functions/freespace.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Erases purgeable disk space with 0s on the selected disk diff --git a/lib/functions/genpwd.sh b/lib/functions/genpwd.sh index dcd065ba..a6520cb4 100644 --- a/lib/functions/genpwd.sh +++ b/lib/functions/genpwd.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Function to generates a strong random password of 27 characters #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - https://dotfiles.io +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - https://dotfiles.io # Made with β™₯ in London, UK by @sebastienrousseau -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # License: MIT # genpwd: Function to generates a strong random password of 20 characters (similar to Apple) diff --git a/lib/functions/goto.sh b/lib/functions/goto.sh index 4e645ff7..f6145123 100644 --- a/lib/functions/goto.sh +++ b/lib/functions/goto.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # goto: Function to change to the directory inputed diff --git a/lib/functions/hidehiddenfiles.sh b/lib/functions/hidehiddenfiles.sh index 49ba8d72..baa8cc96 100644 --- a/lib/functions/hidehiddenfiles.sh +++ b/lib/functions/hidehiddenfiles.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Hide hidden system and dotfile files diff --git a/lib/functions/hostinfo.sh b/lib/functions/hostinfo.sh index 04425929..6f7e9a2f 100644 --- a/lib/functions/hostinfo.sh +++ b/lib/functions/hostinfo.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # hostinfo: Function to display useful host related informaton diff --git a/lib/functions/hstats.sh b/lib/functions/hstats.sh index c7eee6dd..29c69611 100644 --- a/lib/functions/hstats.sh +++ b/lib/functions/hstats.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # hstats: Function to display Ze Shell history stats informaton diff --git a/lib/functions/httpdebug.sh b/lib/functions/httpdebug.sh index 379ce01a..fa31fb0e 100644 --- a/lib/functions/httpdebug.sh +++ b/lib/functions/httpdebug.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # httpdebug: Function to download a web page and show info on what took time diff --git a/lib/functions/keygen.sh b/lib/functions/keygen.sh index b127577a..5ec0d2da 100644 --- a/lib/functions/keygen.sh +++ b/lib/functions/keygen.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # keygen: Function to generates SSH key diff --git a/lib/functions/last.sh b/lib/functions/last.sh index 29cdda76..a6c7884e 100644 --- a/lib/functions/last.sh +++ b/lib/functions/last.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # last: List the modified files within 60 minutes. diff --git a/lib/functions/logout.sh b/lib/functions/logout.sh index 542fe2b0..48a17ca0 100644 --- a/lib/functions/logout.sh +++ b/lib/functions/logout.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # logout: Function to logout from OS X via the Terminal diff --git a/lib/functions/lowercase.sh b/lib/functions/lowercase.sh index bf15a2a4..1023eb37 100644 --- a/lib/functions/lowercase.sh +++ b/lib/functions/lowercase.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # lowercase: Function to move filenames or directory names to lowercase diff --git a/lib/functions/matrix.sh b/lib/functions/matrix.sh index c73df521..af4c23b8 100644 --- a/lib/functions/matrix.sh +++ b/lib/functions/matrix.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # matrix: Function to Enable Matrix Effect in the terminal diff --git a/lib/functions/mount_read_only.sh b/lib/functions/mount_read_only.sh index cefc4d71..7c06101b 100644 --- a/lib/functions/mount_read_only.sh +++ b/lib/functions/mount_read_only.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # mount_read_only: Function to mount a read-only disk image as read-write diff --git a/lib/functions/myproc.sh b/lib/functions/myproc.sh index 97af0ad2..2db245a5 100644 --- a/lib/functions/myproc.sh +++ b/lib/functions/myproc.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # myproc: Function to list processes owned by an user diff --git a/lib/functions/prependpath.sh b/lib/functions/prependpath.sh index d1fe2d29..2356a4a4 100644 --- a/lib/functions/prependpath.sh +++ b/lib/functions/prependpath.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # ---------------------------------------------------------------------------- diff --git a/lib/functions/ql.sh b/lib/functions/ql.sh index fe4ffec1..fca929aa 100644 --- a/lib/functions/ql.sh +++ b/lib/functions/ql.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # ql: Function to open any file in MacOS Quicklook Preview diff --git a/lib/functions/rd.sh b/lib/functions/rd.sh index 9067cbd3..13064855 100644 --- a/lib/functions/rd.sh +++ b/lib/functions/rd.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # rd: Function to remove a directory and its files diff --git a/lib/functions/remove_disk.sh b/lib/functions/remove_disk.sh index 214ddcb7..1b099c23 100644 --- a/lib/functions/remove_disk.sh +++ b/lib/functions/remove_disk.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # remove_disk: spin down unneeded disk diff --git a/lib/functions/ren.sh b/lib/functions/ren.sh index 858fcf16..d5dfba8a 100644 --- a/lib/functions/ren.sh +++ b/lib/functions/ren.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # ren: Function to rename files extension. diff --git a/lib/functions/showhiddenfiles.sh b/lib/functions/showhiddenfiles.sh index daf2c943..b29fdc7a 100644 --- a/lib/functions/showhiddenfiles.sh +++ b/lib/functions/showhiddenfiles.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # Show hidden system and dotfile files diff --git a/lib/functions/size.sh b/lib/functions/size.sh index 7ab5b98b..ad316a7b 100644 --- a/lib/functions/size.sh +++ b/lib/functions/size.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # size: Function to check a file size diff --git a/lib/functions/stopwatch.sh b/lib/functions/stopwatch.sh index de8728a0..1412fbfb 100644 --- a/lib/functions/stopwatch.sh +++ b/lib/functions/stopwatch.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # stopwatch: Function for a stopwatch diff --git a/lib/functions/uppercase.sh b/lib/functions/uppercase.sh index c47f0ad4..f3e75fbc 100644 --- a/lib/functions/uppercase.sh +++ b/lib/functions/uppercase.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # uppercase: Function to move filenames or directory names to uppercase diff --git a/lib/functions/view-source.sh b/lib/functions/view-source.sh index 953b4156..2d8406ac 100644 --- a/lib/functions/view-source.sh +++ b/lib/functions/view-source.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # view-source: Function to view the source of a website. diff --git a/lib/functions/vscode.sh b/lib/functions/vscode.sh index 3788d059..c2340369 100644 --- a/lib/functions/vscode.sh +++ b/lib/functions/vscode.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # vsc: Function to open a file in Visual Studio Code. diff --git a/lib/functions/whoisport.sh b/lib/functions/whoisport.sh index 129eae65..7890f01c 100644 --- a/lib/functions/whoisport.sh +++ b/lib/functions/whoisport.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # whoisport: Function to find what is currently using a port. diff --git a/lib/functions/zipf.sh b/lib/functions/zipf.sh index 08ca3ae8..fcaa6478 100644 --- a/lib/functions/zipf.sh +++ b/lib/functions/zipf.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # zipf: Function to create a ZIP archive of a folder diff --git a/lib/history.sh b/lib/history.sh index c49087ff..c693d79a 100644 --- a/lib/history.sh +++ b/lib/history.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: history.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell history configuration and display # Website: https://dotfiles.io # License: MIT diff --git a/lib/paths.sh b/lib/paths.sh index de4cafde..94138240 100644 --- a/lib/paths.sh +++ b/lib/paths.sh @@ -3,9 +3,9 @@ ################################################################################ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: configurations.sh -# Version: 0.2.468 +# Version: 0.2.469 # Author: @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell configurations # Website: https://dotfiles.io # License: MIT diff --git a/lib/paths/ant/ant.paths.sh b/lib/paths/ant/ant.paths.sh index 2d769de1..5a35d1bc 100644 --- a/lib/paths/ant/ant.paths.sh +++ b/lib/paths/ant/ant.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…°πŸ…½πŸ†ƒ πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ diff --git a/lib/paths/default/default.paths.sh b/lib/paths/default/default.paths.sh index 87230f9a..3ff1fdbd 100644 --- a/lib/paths/default/default.paths.sh +++ b/lib/paths/default/default.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ diff --git a/lib/paths/homebrew/homebrew.paths.sh b/lib/paths/homebrew/homebrew.paths.sh index 3e2edd4e..28dd2ab7 100644 --- a/lib/paths/homebrew/homebrew.paths.sh +++ b/lib/paths/homebrew/homebrew.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…·πŸ…ΎπŸ…ΌπŸ…΄πŸ…±πŸ†πŸ…΄πŸ†† πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ diff --git a/lib/paths/java/java.paths.sh b/lib/paths/java/java.paths.sh index fe3e0200..f45e4d28 100644 --- a/lib/paths/java/java.paths.sh +++ b/lib/paths/java/java.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…ΉπŸ…°πŸ†…πŸ…°_πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ diff --git a/lib/paths/maven/maven.paths.sh b/lib/paths/maven/maven.paths.sh index cff91b23..29aa3c0c 100644 --- a/lib/paths/maven/maven.paths.sh +++ b/lib/paths/maven/maven.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…ΌπŸ…°πŸ†…πŸ…΄πŸ…½ πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ diff --git a/lib/paths/node/node.paths.sh b/lib/paths/node/node.paths.sh index 5bda0f0f..77073389 100644 --- a/lib/paths/node/node.paths.sh +++ b/lib/paths/node/node.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…½πŸ…ΎπŸ…³πŸ…΄ πŸ…ΏπŸ…°πŸ†ƒπŸ…· diff --git a/lib/paths/nvm/nvm.paths.sh b/lib/paths/nvm/nvm.paths.sh index 584d54ef..7e807ece 100644 --- a/lib/paths/nvm/nvm.paths.sh +++ b/lib/paths/nvm/nvm.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…½πŸ†…πŸ…Ό πŸ…ΏπŸ…°πŸ†ƒπŸ…· diff --git a/lib/paths/pnpm/pnpm.paths.sh b/lib/paths/pnpm/pnpm.paths.sh index 25d1852c..ab64f60b 100644 --- a/lib/paths/pnpm/pnpm.paths.sh +++ b/lib/paths/pnpm/pnpm.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…ΏπŸ…½πŸ…ΏπŸ…Ό πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ diff --git a/lib/paths/python/python.paths.sh b/lib/paths/python/python.paths.sh index 681a43ab..4e060dde 100644 --- a/lib/paths/python/python.paths.sh +++ b/lib/paths/python/python.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…ΏπŸ†ˆπŸ†ƒπŸ…·πŸ…ΎπŸ…½ πŸ…ΏπŸ…°πŸ†ƒπŸ…· diff --git a/lib/paths/ruby/ruby.paths.sh b/lib/paths/ruby/ruby.paths.sh index 05cc26f9..fc06da57 100644 --- a/lib/paths/ruby/ruby.paths.sh +++ b/lib/paths/ruby/ruby.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†πŸ†„πŸ…±πŸ†ˆ πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ diff --git a/lib/paths/tmux/tmux.paths.sh b/lib/paths/tmux/tmux.paths.sh index efb803f1..9fb93daa 100644 --- a/lib/paths/tmux/tmux.paths.sh +++ b/lib/paths/tmux/tmux.paths.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†ƒπŸ…ΌπŸ†„πŸ†‡ πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ diff --git a/package.json b/package.json index 9a26b866..f93ff41d 100644 --- a/package.json +++ b/package.json @@ -88,5 +88,5 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "types": "./dist/bin/index.d.ts", - "version": "0.2.468" + "version": "0.2.469" } diff --git a/scripts/backup.sh b/scripts/backup.sh index 19e40fe0..7ea420f5 100755 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†…πŸ…°πŸ†πŸ…ΈπŸ…°πŸ…±πŸ…»πŸ…΄πŸ†‚ - Set Dotfiles variable. diff --git a/scripts/banner.sh b/scripts/banner.sh index 24c6aecd..337555aa 100755 --- a/scripts/banner.sh +++ b/scripts/banner.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…±πŸ…°πŸ…½πŸ…½πŸ…΄πŸ† - Display banner. diff --git a/scripts/build.sh b/scripts/build.sh index 5cc3e181..539424c4 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT # shellcheck disable=SC1091 diff --git a/scripts/clean.sh b/scripts/clean.sh index 624dea38..4d835bb4 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…²πŸ…»πŸ…΄πŸ…°πŸ…½ - Clean up. diff --git a/scripts/compile.sh b/scripts/compile.sh index 7f99c14b..e41c584e 100755 --- a/scripts/compile.sh +++ b/scripts/compile.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…²πŸ…ΎπŸ…ΌπŸ…ΏπŸ…ΈπŸ…»πŸ…΄ πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Compile dotfiles. diff --git a/scripts/copy.sh b/scripts/copy.sh index 87cb3770..d3bdacba 100755 --- a/scripts/copy.sh +++ b/scripts/copy.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…²πŸ…ΎπŸ…ΏπŸ†ˆ - Copy the dotfiles on your system. diff --git a/scripts/dotfiles.sh b/scripts/dotfiles.sh index 1d4b1e37..9aed0be8 100755 --- a/scripts/dotfiles.sh +++ b/scripts/dotfiles.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ…ΈπŸ…ΌπŸ…ΏπŸ…ΎπŸ†πŸ†ƒπŸ†‚ - Importing constants and functions. diff --git a/scripts/download.sh b/scripts/download.sh index 356b516c..b55415ce 100755 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†…πŸ…°πŸ†πŸ…ΈπŸ…°πŸ…±πŸ…»πŸ…΄πŸ†‚ - Set Dotfiles variable. diff --git a/scripts/help.sh b/scripts/help.sh index 56e7d843..2e1ef2ad 100755 --- a/scripts/help.sh +++ b/scripts/help.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†…πŸ…°πŸ†πŸ…ΈπŸ…°πŸ…±πŸ…»πŸ…΄πŸ†‚ - Set Dotfiles variable. diff --git a/scripts/ssh.sh b/scripts/ssh.sh index 034f1013..ac1a42c6 100644 --- a/scripts/ssh.sh +++ b/scripts/ssh.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†‚πŸ†‚πŸ…· - Generate a new SSH key and add it to the ssh-agent diff --git a/scripts/unpack.sh b/scripts/unpack.sh index 32214830..e7b25210 100755 --- a/scripts/unpack.sh +++ b/scripts/unpack.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.468) - -# Made with β™₯ in London, UK by @wwdseb -# Copyright (c) 2015-2024. All rights reserved +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved # License: MIT ## πŸ†…πŸ…°πŸ†πŸ…ΈπŸ…°πŸ…±πŸ…»πŸ…΄πŸ†‚ - Set Dotfiles variable. From 3b0a8a282deedf32757908ef78d4a19051035860 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 08:25:05 +0000 Subject: [PATCH 02/17] refactor(dotfiles): :art: optimizations on vimrc including themes, plugins --- lib/configurations/vim/vimrc | 260 +++++++++++++++++++++++++---------- 1 file changed, 190 insertions(+), 70 deletions(-) diff --git a/lib/configurations/vim/vimrc b/lib/configurations/vim/vimrc index 04439918..00b3d03e 100644 --- a/lib/configurations/vim/vimrc +++ b/lib/configurations/vim/vimrc @@ -1,73 +1,193 @@ " πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -" Copyright (c) Sebastien Rousseau 2022. All rights reserved +" Made with β™₯ in London, UK by Sebastien Rousseau +" Copyright (c) 2015-2025. All rights reserved " License: MIT -set autoindent " autoindent -set autoread " auto-read -set background=dark " background color (dark) -set backspace=indent,eol,start " backspace behavior (indent, eol, start) -set backupdir=~/.vim/backups " backup directory (~/.vim/backups) -set cc=80 " column count (80) -set clipboard=unnamedplus " clipboard support (unnamedplus) -set cmdheight=1 " command line height (1) -set confirm " confirm before exiting -set cursorline " cursorline support -set encoding=utf-8 " encoding support (utf-8) -set expandtab " expandtab support -set foldmethod=indent " foldmethod support -set foldnestmax=3 " foldnestmax support (3) -set gcr=a:blinkon0 " disable blinking cursor (a:blinkon0) -set hidden " hidden support -set history=10000 " history support (10000) -set hlsearch " highlight search -set ignorecase " ignorecase support -set incsearch " incremental search -set laststatus=2 " laststatus support (2) -set lazyredraw " lazyredraw support -set linebreak " linebreak support -set modelines=0 " modelines support (0) -set mouse=a " mouse support (all) -set nobackup " nobackup support -set nocompatible " nocompatible support -set nocp " nocp support" -set nofoldenable " nofoldenable support -set nomodeline " nomodeline support -set noswapfile " noswapfile support -set nowb " nowb support" -set nowrap " nowrap support -set number " number support -set ruler " ruler support" -set scrolloff=3 " scrolloff support (3) -set shiftwidth=2 " shiftwidth support (2) -set showcmd " showcmd support -set showmatch " showmatch support -set showmode " showmode support" -set showtabline=2 " showtabline support (2) -set sidescroll=1 " sidescroll support (1) -set sidescrolloff=15 " sidescrolloff support (15) -set smartcase " smartcase support -set smartindent " smartindent support -set smarttab " smarttab support -set softtabstop=2 " softtabstop support (2) -set spell " spell support -set spelllang=en " spelllang support (en) -set switchbuf=useopen " switchbuf support (useopen) -set t_Co=256 " t_Co support (256) -set tabstop=2 " tabstop support (2) -set textwidth=79 " textwidth support (79) -set title " title support -set ttyfast " ttyfast support -set visualbell " visualbell support -set wildignore+=*.png,*.jpg,*.gif " wildignore support (png, jpg, gif) -set wildignore+=*DS_Store* " wildignore support (DS_Store) -set wildignore+=*sass-cache* " wildignore support (sass-cache) -set wildignore+=*vim/backups* " wildignore support (vim/backups) -set wildignore+=log/** " wildignore support (log) -set wildignore+=tmp/** " wildignore support (tmp) -set wildignore+=vendor/cache/** " wildignore support (vendor/cache) -set wildmenu " wildmenu support -set wildmode=longest,list " wildmode support (longest,list) -set winwidth=79 " winwidth support (79) -set wrap " wrap support -syntax enable " syntax support (enable) -syntax on " syntax support (on) +"----------------------------------------------------------------------------- +" Plugin Manager: vim-plug +"----------------------------------------------------------------------------- +" Auto-install vim-plug if not present +if empty(glob('~/.vim/autoload/plug.vim')) + silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + autocmd VimEnter * PlugInstall | source $MYVIMRC +endif +runtime autoload/plug.vim + +call plug#begin('~/.vim/plugged') + +" Core Functionality +Plug 'preservim/nerdtree' " File explorer +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Fuzzy finder +Plug 'junegunn/fzf.vim' " FZF integration +Plug 'easymotion/vim-easymotion' " Enhanced motion commands +Plug 'mbbill/undotree' " Visual undo history + +" Editor Enhancement +Plug 'jiangmiao/auto-pairs' " Auto-close pairs +Plug 'tpope/vim-surround' " Surround text objects +Plug 'tpope/vim-commentary' " Comment code +Plug 'editorconfig/editorconfig-vim' " EditorConfig support + +" Git Integration +Plug 'tpope/vim-fugitive' " Git commands +Plug 'airblade/vim-gitgutter' " Git diff in sign column + +" Language Support & Completion +Plug 'neoclide/coc.nvim', {'branch': 'release'} " Intellisense engine +Plug 'sheerun/vim-polyglot' " Language pack +Plug 'dense-analysis/ale' " Linting engine +Plug 'rust-lang/rust.vim' " Rust support +Plug 'fatih/vim-go' " Go support +Plug 'plasticboy/vim-markdown' " Markdown support + +" UI Enhancement +Plug 'vim-airline/vim-airline' " Status line +Plug 'vim-airline/vim-airline-themes' " Airline themes +Plug 'dracula/vim', { 'as': 'dracula' } " Color scheme + +call plug#end() + +"----------------------------------------------------------------------------- +" Terminal Settings +"----------------------------------------------------------------------------- +set t_Co=256 " Use 256 colors +let &t_ut='' " Clear background better +if has('termguicolors') + set termguicolors " Enable true colors +endif + +"----------------------------------------------------------------------------- +" General Settings +"----------------------------------------------------------------------------- +set nocompatible " Use Vim settings rather than Vi +set encoding=utf-8 " UTF-8 encoding +set fileencoding=utf-8 " UTF-8 file encoding +set history=10000 " Command history +set hidden " Allow hidden buffers +set secure " Restrict unsafe commands +set autoread " Auto-reload changed files +set mouse=a " Enable mouse support +set backspace=indent,eol,start " Normal backspace behavior + +"----------------------------------------------------------------------------- +" UI Configuration +"----------------------------------------------------------------------------- +set background=dark " Dark background +colorscheme dracula " Use dracula theme + +set number " Show line numbers +set relativenumber " Relative line numbers +set cursorline " Highlight current line +set ruler " Show cursor position +set colorcolumn=80 " Mark column 80 +set signcolumn=yes " Always show sign column +set cmdheight=1 " Command line height +set laststatus=2 " Always show status line +set showcmd " Show command in progress +set showmode " Show current mode +set showmatch " Show matching brackets +set title " Window title +set visualbell " Visual bell +set noerrorbells " No error bells +set list " Show invisible characters +set listchars=tab:>\ ,trail:-,nbsp:+ " Show invisible characters + +"----------------------------------------------------------------------------- +" Editor Settings +"----------------------------------------------------------------------------- +set expandtab " Use spaces instead of tabs +set tabstop=2 " Spaces per tab +set softtabstop=2 " Spaces per tab in insert mode +set shiftwidth=2 " Spaces for autoindent +set autoindent " Copy indent from current line +set smartindent " Smart auto-indenting +set wrap " Wrap lines +set linebreak " Break lines at word boundary +set textwidth=80 " Text width + +"----------------------------------------------------------------------------- +" Search Settings +"----------------------------------------------------------------------------- +set hlsearch " Highlight search results +set incsearch " Incremental search +set ignorecase " Case-insensitive search +set smartcase " Smart case search +set path+=** " Search down into subfolders + +"----------------------------------------------------------------------------- +" File Management +"----------------------------------------------------------------------------- +set nobackup " No backup files +set nowritebackup " No backup while editing +set noswapfile " No swap files +set undofile " Persistent undo +set undodir=~/.vim/undodir " Undo directory + +" Create undo directory if it doesn't exist +if !isdirectory(&undodir) + call mkdir(&undodir, 'p', 0700) +endif + +"----------------------------------------------------------------------------- +" Airline Configuration +"----------------------------------------------------------------------------- +let g:airline_powerline_fonts = 0 " Disable powerline fonts +let g:airline_symbols_ascii = 1 " Use ASCII symbols +let g:airline#extensions#tabline#enabled = 1 +let g:airline#extensions#tabline#formatter = 'unique_tail' +let g:airline_skip_empty_sections = 1 + +"----------------------------------------------------------------------------- +" Key Mappings +"----------------------------------------------------------------------------- +let mapleader = " " " Set leader key to space + +" File operations +nnoremap w :w " Quick save +nnoremap q :q " Quick quit +nnoremap x :x " Save and quit +nnoremap sv :source $MYVIMRC " Reload vimrc + +" Window navigation +nnoremap h " Move to left window +nnoremap j " Move to window below +nnoremap k " Move to window above +nnoremap l " Move to right window + +" Plugin mappings +nnoremap :NERDTreeToggle +nnoremap f :Files +nnoremap b :Buffers + +"----------------------------------------------------------------------------- +" Plugin Settings +"----------------------------------------------------------------------------- +" NERDTree +let NERDTreeShowHidden = 1 + +" FZF +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.8 } } + +" ALE +let g:ale_fix_on_save = 1 +let g:ale_linters = { +\ 'python': ['flake8', 'pylint'], +\ 'javascript': ['eslint'], +\ 'typescript': ['eslint'], +\ 'rust': ['analyzer'] +\} + +"----------------------------------------------------------------------------- +" Auto Commands +"----------------------------------------------------------------------------- +if has("autocmd") + augroup FileTypeSpecific + autocmd! + autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab + autocmd FileType json setlocal ts=2 sts=2 sw=2 expandtab + autocmd FileType markdown setlocal wrap linebreak nolist + autocmd FileType rust setlocal ts=4 sts=4 sw=4 expandtab + autocmd FileType go setlocal noexpandtab ts=4 sw=4 + augroup END +endif From 88b7b3b714de3278756a2b25d544b59c0ec425cc Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 08:59:05 +0000 Subject: [PATCH 03/17] fix(dotfiles): :bug: change logo width and rust aliases --- .github/CODE-OF-CONDUCT.md | 2 +- .github/CONTRIBUTING.md | 2 +- .github/SECURITY.md | 2 +- README.md | 2 +- lib/README.md | 2 +- lib/aliases/README.md | 2 +- lib/aliases/archives/README.md | 2 +- lib/aliases/cd/README.md | 2 +- lib/aliases/chmod/README.md | 2 +- lib/aliases/clear/README.md | 2 +- lib/aliases/configuration/README.md | 2 +- lib/aliases/default/README.md | 2 +- lib/aliases/dig/README.md | 2 +- lib/aliases/disk-usage/README.md | 2 +- lib/aliases/editor/README.md | 2 +- lib/aliases/find/README.md | 2 +- lib/aliases/gcloud/README.md | 2 +- lib/aliases/git/README.md | 2 +- lib/aliases/gnu/README.md | 2 +- lib/aliases/heroku/README.md | 2 +- lib/aliases/interactive/README.md | 2 +- lib/aliases/jekyll/README.md | 2 +- lib/aliases/list/README.md | 2 +- lib/aliases/macOS/README.md | 2 +- lib/aliases/make/README.md | 2 +- lib/aliases/mkdir/README.md | 2 +- lib/aliases/npm/README.md | 2 +- lib/aliases/permission/README.md | 2 +- lib/aliases/pnpm/README.md | 2 +- lib/aliases/ps/README.md | 2 +- lib/aliases/rsync/README.md | 2 +- lib/aliases/rust/README.md | 206 ++++++++++++++++++++------ lib/aliases/rust/rust.aliases.sh | 220 ++++++++++++++-------------- lib/aliases/subversion/README.md | 2 +- lib/aliases/sudo/README.md | 2 +- lib/aliases/tmux/README.md | 2 +- lib/aliases/update/README.md | 2 +- lib/aliases/uuid/README.md | 2 +- lib/aliases/wget/README.md | 2 +- lib/configurations/README.md | 2 +- lib/functions/README.md | 2 +- 41 files changed, 308 insertions(+), 196 deletions(-) diff --git a/.github/CODE-OF-CONDUCT.md b/.github/CODE-OF-CONDUCT.md index 5ae161d0..2fba849c 100644 --- a/.github/CODE-OF-CONDUCT.md +++ b/.github/CODE-OF-CONDUCT.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0e902530..9c65e18d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 9fb8ba0f..00868a29 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/README.md b/README.md index d1b2deeb..345da9c4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/README.md b/lib/README.md index 0ca7ac45..863c7686 100644 --- a/lib/README.md +++ b/lib/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/README.md b/lib/aliases/README.md index 881abe61..bf26b7ec 100644 --- a/lib/aliases/README.md +++ b/lib/aliases/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/archives/README.md b/lib/aliases/archives/README.md index be67ca05..b855ccb3 100644 --- a/lib/aliases/archives/README.md +++ b/lib/aliases/archives/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/cd/README.md b/lib/aliases/cd/README.md index c3d0a135..4a490590 100644 --- a/lib/aliases/cd/README.md +++ b/lib/aliases/cd/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/chmod/README.md b/lib/aliases/chmod/README.md index fad14389..ce7302c6 100644 --- a/lib/aliases/chmod/README.md +++ b/lib/aliases/chmod/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/clear/README.md b/lib/aliases/clear/README.md index 433e97c8..8275d950 100644 --- a/lib/aliases/clear/README.md +++ b/lib/aliases/clear/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/configuration/README.md b/lib/aliases/configuration/README.md index 51e93bfe..84e6392f 100644 --- a/lib/aliases/configuration/README.md +++ b/lib/aliases/configuration/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/default/README.md b/lib/aliases/default/README.md index e7c42d8b..15891adb 100644 --- a/lib/aliases/default/README.md +++ b/lib/aliases/default/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/dig/README.md b/lib/aliases/dig/README.md index c3c9069d..008e057d 100644 --- a/lib/aliases/dig/README.md +++ b/lib/aliases/dig/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/disk-usage/README.md b/lib/aliases/disk-usage/README.md index 14f55c37..fcde6be0 100644 --- a/lib/aliases/disk-usage/README.md +++ b/lib/aliases/disk-usage/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/editor/README.md b/lib/aliases/editor/README.md index ea8ca86b..190dadf9 100644 --- a/lib/aliases/editor/README.md +++ b/lib/aliases/editor/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/find/README.md b/lib/aliases/find/README.md index 36a337ac..45704d90 100644 --- a/lib/aliases/find/README.md +++ b/lib/aliases/find/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/gcloud/README.md b/lib/aliases/gcloud/README.md index 26418bb3..94b46391 100644 --- a/lib/aliases/gcloud/README.md +++ b/lib/aliases/gcloud/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/git/README.md b/lib/aliases/git/README.md index 5be34577..993e61ba 100644 --- a/lib/aliases/git/README.md +++ b/lib/aliases/git/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/gnu/README.md b/lib/aliases/gnu/README.md index a1510e26..f1bd2955 100644 --- a/lib/aliases/gnu/README.md +++ b/lib/aliases/gnu/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/heroku/README.md b/lib/aliases/heroku/README.md index 94859ed4..0c0f2d52 100644 --- a/lib/aliases/heroku/README.md +++ b/lib/aliases/heroku/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/interactive/README.md b/lib/aliases/interactive/README.md index 4fe85389..3e90a5ec 100644 --- a/lib/aliases/interactive/README.md +++ b/lib/aliases/interactive/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/jekyll/README.md b/lib/aliases/jekyll/README.md index c7821995..e72434c7 100644 --- a/lib/aliases/jekyll/README.md +++ b/lib/aliases/jekyll/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/list/README.md b/lib/aliases/list/README.md index 32051dab..276d7705 100644 --- a/lib/aliases/list/README.md +++ b/lib/aliases/list/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/macOS/README.md b/lib/aliases/macOS/README.md index d0225837..c266d915 100644 --- a/lib/aliases/macOS/README.md +++ b/lib/aliases/macOS/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/make/README.md b/lib/aliases/make/README.md index bae29b48..a3e482d0 100644 --- a/lib/aliases/make/README.md +++ b/lib/aliases/make/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/mkdir/README.md b/lib/aliases/mkdir/README.md index 70aa7fd4..983f78ef 100644 --- a/lib/aliases/mkdir/README.md +++ b/lib/aliases/mkdir/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/npm/README.md b/lib/aliases/npm/README.md index bf1c63af..0a4c4cf0 100644 --- a/lib/aliases/npm/README.md +++ b/lib/aliases/npm/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/permission/README.md b/lib/aliases/permission/README.md index 1c46e846..b6e6f1a5 100644 --- a/lib/aliases/permission/README.md +++ b/lib/aliases/permission/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/pnpm/README.md b/lib/aliases/pnpm/README.md index 01c1e3d5..e09ff829 100644 --- a/lib/aliases/pnpm/README.md +++ b/lib/aliases/pnpm/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/ps/README.md b/lib/aliases/ps/README.md index b88b9e4d..2d017dad 100644 --- a/lib/aliases/ps/README.md +++ b/lib/aliases/ps/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/rsync/README.md b/lib/aliases/rsync/README.md index 9d05507a..ec8a5ba9 100644 --- a/lib/aliases/rsync/README.md +++ b/lib/aliases/rsync/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/rust/README.md b/lib/aliases/rust/README.md index bd82e3c2..f687620d 100644 --- a/lib/aliases/rust/README.md +++ b/lib/aliases/rust/README.md @@ -1,12 +1,10 @@ - dotfiles logo - # Dotfiles (v0.2.469) @@ -17,45 +15,167 @@ Simply designed to fit your shell life 🐚 ## πŸ†πŸ†„πŸ†‚πŸ†ƒπŸ†„πŸ…Ώ πŸ…°πŸ…½πŸ…³ πŸ…²πŸ…°πŸ†πŸ…ΆπŸ…Ύ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ -This code provides a set of aliases for the `rustup` and `cargo` -commands. - -- `cg` Cargo shortcut. -- `cgb` Cargo build. -- `cgbh` Cargo bench. -- `cgbr` Cargo build release. -- `cgc` Cargo check. -- `cgcl` Cargo clean. -- `cgcy` Cargo clippy. -- `cgd` Cargo doc. -- `cgdr` Cargo doc release. -- `cgf` Cargo format. -- `cgi` Cargo install. -- `cginit` Cargo init. -- `cgn` Cargo new. -- `cgp` Cargo publish. -- `cgr` Cargo run. -- `cgrr` Cargo run release. -- `cgs` Cargo search. -- `cgt` Cargo test. -- `cgtr` Cargo test release. -- `cgtt` Cargo tree. -- `cgu` Cargo update. -- `cgun` Cargo uninstall. -- `ru` Rustup update. -- `rca` Rustup component add. -- `rcl` Rustup component list. -- `rcr` Rustup component remove. -- `rde` Rustup default. -- `rnn` Run rustup nightly. -- `rns` Run rustup stable. -- `rtaa` Rustup target add. -- `rtal` Rustup target list. -- `rtar` Rustup target remove. -- `rti` Rustup toolchain install. -- `rtl` Rustup toolchain list. -- `rtu` Rustup toolchain uninstall. -- `ruc` Update rustup nightly. -- `rus` Update rustup stable. +This code provides a comprehensive set of aliases for Rust development using `cargo` and `rustup` commands. + +### Cargo Aliases + +#### Basic Commands + +- `cg` - Cargo shortcut +- `cgn` - Create new binary project +- `cgni` - Create new library project +- `cginit` - Initialize project in current directory + +#### Build and Run + +- `cgb` - Build debug +- `cgbr` - Build release +- `cgr` - Run debug +- `cgrr` - Run release +- `cgw` - Watch and rebuild + +#### Testing and Benchmarking + +- `cgt` - Run tests +- `cgtr` - Run tests in release mode +- `cgbh` - Run benchmarks +- `cgta` - Test all targets +- `cgtt` - Single threaded tests + +#### Code Quality + +- `cgc` - Check compilation +- `cgcl` - Clean build artifacts +- `cgcy` - Run clippy lints +- `cgf` - Format code +- `cgfa` - Format all code +- `cgfx` - Auto-fix code issues +- `cgaud` - Security vulnerabilities check + +#### Documentation + +- `cgd` - Build and open documentation +- `cgdr` - Build release documentation +- `cgdo` - Document private items + +#### Dependencies + +- `cga` - Add dependency +- `cgad` - Add dev dependency +- `cgu` - Update dependencies +- `cgo` - Check outdated dependencies +- `cgv` - Vendor dependencies +- `cgtree` - Display dependency tree + +#### Cross Compilation + +- `cgx` - Build using Zig +- `cgxw` - Cross compilation +- `cgxt` - Target specific platform + +#### Analysis and Profiling + +- `cgfl` - Generate flamegraph +- `cgbl` - Binary size analysis +- `cgl` - Code coverage +- `cgm` - Module structure +- `cgex` - Expand macros + +#### Package Management + +- `cgi` - Install binary +- `cgun` - Uninstall binary +- `cgp` - Publish to crates.io +- `cgs` - Search crates.io +- `cgcp` - Create release package + +#### Advanced Build + +- `cgba` - Build all targets +- `cgbt` - Build with all features +- `cgbp` - Build with specific profile + +#### Project Templates + +- `cgnb` - New binary from template +- `cgnl` - New library from template +- `cgnt` - New from custom template + +### Rustup Aliases + +#### Updates and Installation + +- `ru` - Update all toolchains +- `rus` - Update stable toolchain +- `run` - Update nightly toolchain +- `rti` - Install specific toolchain + +#### Components Management + +- `rca` - Add component +- `rcl` - List components +- `rcr` - Remove component + +#### Toolchain Management + +- `rtl` - List installed toolchains +- `rtu` - Uninstall toolchain +- `rde` - Set default toolchain + +#### Target Management + +- `rtaa` - Add compilation target +- `rtal` - List available targets +- `rtar` - Remove compilation target + +#### Environment Running + +- `rns` - Run command with stable +- `rnn` - Run command with nightly + +#### Documentation and Help + +- `rdo` - Open Rust documentation + +#### Override Management + +- `rpr` - Set directory toolchain +- `rpl` - List directory overrides +- `rpn` - Remove directory override + +#### Toolchain Information + +- `rws` - Show active rustc path +- `rsh` - Show toolchain info + +### Common Workflows + +#### New Project Setup + +```bash +# Create new project with common dependencies +cgn myproject && cd myproject && cga serde && cgad tokio +``` + +#### Release Workflow + +```bash +# Check, test, and build for release +cgcy && cgt && cgbr && cgaud +``` + +#### Documentation Update + +```bash +# Format code and update documentation +cgfa && cgd && cgdo +``` + +#### Cross-compilation Check + +```bash +# Check build for different architecture +cgxw check --target aarch64-unknown-linux-gnu +``` [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg diff --git a/lib/aliases/rust/rust.aliases.sh b/lib/aliases/rust/rust.aliases.sh index a8319a43..1c6d2ee0 100644 --- a/lib/aliases/rust/rust.aliases.sh +++ b/lib/aliases/rust/rust.aliases.sh @@ -1,127 +1,119 @@ #!/usr/bin/env bash - # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - # Made with β™₯ in London, UK by Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # License: MIT # πŸ…²πŸ…°πŸ†πŸ…ΆπŸ…Ύ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - if command -v 'cargo' >/dev/null; then - # c: Cargo shortcut. - alias cg='cargo' - - # cgb: Cargo build. - alias cgb='cg build' - - # cgbh: Cargo bench. - alias cgbh='cg bench' - - # cbr: Cargo build release. - alias cgbr='cg build --release' - - # cgc: Cargo check. - alias cgc='cg check' - - # cgcl: Cargo clean. - alias cgcl='cg clean' - - # cgcy: Cargo clippy. - alias cgcy='cg clippy' - - # cgd: Cargo doc. - alias cgd='cg doc --open' - - # cgdr: Cargo doc release. - alias cgdr='cg doc --release' - - # cgf: Cargo format. - alias cgf='cg fmt' - - # cgi: Cargo install. - alias cgi='cg install' - - # cginit: Cargo init. - alias cginit='cg init' - - # cgn: Cargo new. - alias cgn='cg new' - - # cgp: Cargo publish. - alias cgp='cg publish' - - # cgr: Cargo run. - alias cgr='cg run' - - # cgrr: Cargo run release. - alias cgrr='cg run --release' - - # cgs: Cargo search. - alias cgs='cg search' - - # cgt: Cargo test. - alias cgt='cg test' - - # cgtr: Cargo test release. - alias cgtr='cg test --release' - - # cgtt: Cargo tree. - alias cgtt='cg tree' - - # cgu: Cargo update. - alias cgu='cg update' - - # cgun: Cargo uninstall. - alias cgun='cg uninstall' - + # Basic Commands + alias cg='cargo' # Cargo shortcut + alias cgn='cg new' # Create new binary project + alias cgni='cg new --lib' # Create new library project + alias cginit='cg init' # Initialize project in current directory + + # Build and Run + alias cgb='cg build' # Build debug + alias cgbr='cg build --release' # Build release + alias cgr='cg run' # Run debug + alias cgrr='cg run --release' # Run release + alias cgw='cg watch' # Watch and rebuild + + # Testing and Benchmarking + alias cgt='cg test' # Run tests + alias cgtr='cg test --release' # Run tests in release mode + alias cgbh='cg bench' # Run benchmarks + alias cgta='cg test --all' # Test all targets + alias cgtt='cg test -- --test-threads=1' # Single threaded tests + + # Code Quality + alias cgc='cg check' # Check compilation + alias cgcl='cg clean' # Clean build artifacts + alias cgcy='cg clippy' # Run clippy lints + alias cgf='cg fmt' # Format code + alias cgfa='cg fmt --all' # Format all code + alias cgfx='cg fix' # Auto-fix code issues + alias cgaud='cg audit' # Security vulnerabilities check + + # Documentation + alias cgd='cg doc --open' # Build and open documentation + alias cgdr='cg doc --release' # Build release documentation + alias cgdo='cg doc --document-private-items' # Document private items + + # Dependencies + alias cga='cg add' # Add dependency + alias cgad='cg add --dev' # Add dev dependency + alias cgu='cg update' # Update dependencies + alias cgo='cg outdated' # Check outdated dependencies + alias cgv='cg vendor' # Vendor dependencies + alias cgtree='cg tree' # Display dependency tree + + # Cross Compilation + alias cgx='cg zigbuild' # Build using Zig + alias cgxw='cg cross' # Cross compilation + alias cgxt='cg target' # Target specific platform + + # Analysis and Profiling + alias cgfl='cg flamegraph' # Generate flamegraph + alias cgbl='cg bloat' # Binary size analysis + alias cgl='cg llvm-cov' # Code coverage + alias cgm='cg modules' # Module structure + alias cgex='cg expand' # Expand macros + + # Package Management + alias cgi='cg install' # Install binary + alias cgun='cg uninstall' # Uninstall binary + alias cgp='cg publish' # Publish to crates.io + alias cgs='cg search' # Search crates.io + alias cgcp='cg package' # Create release package + + # Advanced Build + alias cgba='cg build --all-targets' # Build all targets + alias cgbt='cg build --all-features' # Build with all features + alias cgbp='cg build --release --profile' # Build with specific profile + + # Project Templates + alias cgnb='cg generate --bin' # New binary from template + alias cgnl='cg generate --lib' # New library from template + alias cgnt='cg generate' # New from custom template fi # πŸ†πŸ†„πŸ†‚πŸ†ƒπŸ†„πŸ…Ώ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ if command -v 'rustup' >/dev/null; then - - # Rustup update. - alias ru='rustup update' - - # Rustup component add. - alias rca='rustup component add' - - # Rustup component list. - alias rcl='rustup component list' - - # Rustup component remove. - alias rcr='rustup component remove' - - # Rustup default. - alias rde='rustup default' - - # Run rustup nightly. - alias rnn='rustup run nightly' - - # Run rustup stable. - alias rns='rustup run stable' - - # Rustup target add. - alias rtaa='rustup target add' - - # Rustup target list. - alias rtal='rustup target list' - - # Rustup target remove. - alias rtar='rustup target remove' - - # Rustup toolchain install. - alias rti='rustup toolchain install' - - # Rustup toolchain list. - alias rtl='rustup toolchain list' - - # Rustup toolchain uninstall. - alias rtu='rustup toolchain uninstall' - - # Update rustup nightly. - alias ruc='rustup update nightly' - - # Update rustup stable. - alias rus='rustup update stable' - + # Updates and Installation + alias ru='rustup update' # Update all toolchains + alias rus='rustup update stable' # Update stable toolchain + alias run='rustup update nightly' # Update nightly toolchain + alias rti='rustup toolchain install' # Install specific toolchain + + # Components Management + alias rca='rustup component add' # Add component + alias rcl='rustup component list' # List components + alias rcr='rustup component remove' # Remove component + + # Toolchain Management + alias rtl='rustup toolchain list' # List installed toolchains + alias rtu='rustup toolchain uninstall' # Uninstall toolchain + alias rde='rustup default' # Set default toolchain + + # Target Management + alias rtaa='rustup target add' # Add compilation target + alias rtal='rustup target list' # List available targets + alias rtar='rustup target remove' # Remove compilation target + + # Environment Running + alias rns='rustup run stable' # Run command with stable + alias rnn='rustup run nightly' # Run command with nightly + + # Documentation and Help + alias rdo='rustup doc --open' # Open Rust documentation + + # Override Management + alias rpr='rustup override set' # Set directory toolchain + alias rpl='rustup override list' # List directory overrides + alias rpn='rustup override none' # Remove directory override + + # Toolchain Information + alias rws='rustup which rustc' # Show active rustc path + alias rsh='rustup show' # Show toolchain info fi diff --git a/lib/aliases/subversion/README.md b/lib/aliases/subversion/README.md index cf29ce90..b1eac0bc 100644 --- a/lib/aliases/subversion/README.md +++ b/lib/aliases/subversion/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/sudo/README.md b/lib/aliases/sudo/README.md index 21607928..12bb871f 100644 --- a/lib/aliases/sudo/README.md +++ b/lib/aliases/sudo/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/tmux/README.md b/lib/aliases/tmux/README.md index c5f71bda..feda07e3 100644 --- a/lib/aliases/tmux/README.md +++ b/lib/aliases/tmux/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/update/README.md b/lib/aliases/update/README.md index 359c6519..fdbbbd70 100644 --- a/lib/aliases/update/README.md +++ b/lib/aliases/update/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/uuid/README.md b/lib/aliases/uuid/README.md index ee2860c9..ced446d3 100644 --- a/lib/aliases/uuid/README.md +++ b/lib/aliases/uuid/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/aliases/wget/README.md b/lib/aliases/wget/README.md index bb241351..d277e28e 100644 --- a/lib/aliases/wget/README.md +++ b/lib/aliases/wget/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/configurations/README.md b/lib/configurations/README.md index abd7cfbf..83615e81 100644 --- a/lib/configurations/README.md +++ b/lib/configurations/README.md @@ -3,7 +3,7 @@ dotfiles logo diff --git a/lib/functions/README.md b/lib/functions/README.md index 1b7c8cb2..6549bb69 100644 --- a/lib/functions/README.md +++ b/lib/functions/README.md @@ -3,7 +3,7 @@ dotfiles logo From 927be0c0399b7fbc9fc8dd84f39090d89337b634 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 10:01:57 +0000 Subject: [PATCH 04/17] fix(dotfiles): :bug: fix release.yml and archives aliases --- .github/workflows/release.yml | 145 +++++++------ lib/aliases/archives/README.md | 149 ++++++++++--- lib/aliases/archives/archives.aliases.sh | 254 +++++++++++------------ package.json | 14 +- 4 files changed, 321 insertions(+), 241 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f20af78..f8d5f330 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,97 +1,106 @@ name: Release -on: [push, pull_request] - +#----------------------------------------------------------------------------- +# Events triggering this workflow +#----------------------------------------------------------------------------- +on: + push: + branches: + - main # Trigger on pushes to the 'main' branch + pull_request: + branches: + - main # Trigger on pull requests to the 'main' branch + +#----------------------------------------------------------------------------- +# Jobs: Tasks executed as part of the release workflow +#----------------------------------------------------------------------------- jobs: + # Build job build: + name: Build the project runs-on: ubuntu-latest strategy: matrix: - node-version: [21.x] + node-version: [18, 21] # Test against Node.js 18 and 21 steps: - - run: echo ${{github.ref}} - - - uses: actions/checkout@v3 + # Step 1: Check out the repository + - name: Check out code + uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.4 + # Step 2: Set up Node.js + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 with: - version: 7 + node-version: ${{ matrix.node-version }} # Use the Node.js version from the matrix + cache: pnpm # Enable caching for pnpm dependencies - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + # Step 3: Set up pnpm + - name: Install pnpm + uses: pnpm/action-setup@v2.2.4 with: - node-version: ${{ matrix.node-version }} - cache: "pnpm" + version: 8.6.3 # Specify a stable pnpm version + # Step 4: Install dependencies - name: Install dependencies - run: pnpm install --no-frozen-lockfile + run: pnpm install --frozen-lockfile # Ensure lockfile integrity - - name: Build + # Step 5: Build the project + - name: Build the project run: pnpm run build - # publish: - # needs: build - # runs-on: ubuntu-latest - - # steps: - # - uses: actions/checkout@v2 - - # - uses: pnpm/action-setup@v2.2.4 - # with: - # version: 7 + # Step 6: Upload build artifacts + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: dist # Artifact name + path: ./dist # Directory containing the build output - # - name: Install dependencies - # run: pnpm install --no-frozen-lockfile + # Publish to NPM and GitHub registries + publish: + name: Publish the package + needs: build # Wait for the 'build' job to complete + runs-on: ubuntu-latest - # - name: Build - # run: pnpm run build + steps: + # Step 1: Check out the repository + - name: Check out code + uses: actions/checkout@v3 - # - name: Pack - # run: pnpm pack + # Step 2: Download build artifacts + - name: Download build artifacts + uses: actions/download-artifact@v3 + with: + name: dist # Artifact name from the 'build' job + path: ./dist # Directory to place the downloaded artifacts - # - name: Result - # run: ls -al ./dist + # Step 3: Set up Node.js + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 # Use Node.js version 18 + cache: pnpm # Enable pnpm cache - # - name: Publish to NPM - # run: pnpm publish --access public --tag latest --no-git-checks - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # Step 4: Install pnpm + - name: Install pnpm + run: npm install -g pnpm - # - name: Set package registry - # run: pnpm config set registry https://npm.pkg.github.com + # Step 5: Authenticate with npm registry + - name: Authenticate with npm registry + run: pnpm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - # - name: Github package registry authentication - # run: pnpm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }} + # Step 6: Publish to npm registry + - name: Publish to npm registry + run: pnpm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - # - name: Npm registry authentication - # run: pnpm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} + # Step 7: Authenticate with GitHub Package Registry + - name: Authenticate with GitHub Package Registry + run: pnpm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }} - # - name: Publish the package to Github package registry - # run: pnpm publish --access public --tag latest --no-git-checks - # env: - # NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + # Step 8: Publish to GitHub Package Registry + - name: Publish to GitHub Package Registry + run: pnpm publish --access public - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: Install pnpm - run: npm install -g pnpm - - run: pnpm install - - run: pnpm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.npm_token }} - - name: Set package registry - run: pnpm config set registry https://npm.pkg.github.com - - name: Github package registry authentication - run: pnpm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }} - - name: Npm registry authentication - run: pnpm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - - name: Publish the package to Github and Npm package registries - run: pnpm publish --access=public diff --git a/lib/aliases/archives/README.md b/lib/aliases/archives/README.md index b855ccb3..cbd4058b 100644 --- a/lib/aliases/archives/README.md +++ b/lib/aliases/archives/README.md @@ -1,12 +1,10 @@ - dotfiles logo - # Dotfiles (v0.2.469) @@ -15,45 +13,132 @@ Simply designed to fit your shell life 🐚 ![Dotfiles banner][banner] -## πŸ…°πŸ†πŸ…²πŸ…·πŸ…ΈπŸ†…πŸ…΄πŸ†‚ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ +## πŸ…°πŸ†πŸ…²πŸ…·πŸ…ΈπŸ†…πŸ…΄ πŸ…°πŸ…½πŸ…³ πŸ…²πŸ…ΎπŸ…ΌπŸ…ΏπŸ†πŸ…΄πŸ†‚πŸ†‚πŸ…ΈπŸ…ΎπŸ…½ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ + +This module provides comprehensive tools for handling various archive and compression formats. + +### Universal Extract Function + +The `extract` command automatically handles various archive formats: + +```bash +extract archive.tar.gz # Automatically detects format and extracts +``` + +Supported formats: + +- `.tar.bz2`, `.tbz2` +- `.tar.gz`, `.tgz` +- `.tar.xz` +- `.tar.zst` +- `.tar` +- `.bz2` +- `.gz` +- `.rar` +- `.zip` +- `.Z` +- `.7z` +- `.zst` +- `.xz` +- `.lz4` + +### Large File Compression + +The `compress_large` function handles large file compression with streaming: + +```bash +compress_large gz largefile.dat # Creates largefile.dat.gz +compress_large xz data.bin output.xz # Specific output name +``` + +Supported formats: `gz`, `bz2`, `xz`, `zst`, `lz4` + +### Archive Tools + +#### 7-Zip Aliases + +- `a7z` - Create 7z archive +- `x7z` - Extract 7z archive +- `l7z` - List contents +- `t7z` - Test integrity + +#### Tar Aliases + +- `ctar` - Create tar archive +- `xtar` - Extract tar archive +- `ltar` - List contents +- `ctgz` - Create tar.gz archive +- `xtgz` - Extract tar.gz archive +- `ctbz` - Create tar.bz2 archive +- `xtbz` - Extract tar.bz2 archive +- `ctxz` - Create tar.xz archive +- `xtxz` - Extract tar.xz archive +- `ctzst` - Create tar.zst archive +- `xtzst` - Extract tar.zst archive + +#### Zip Aliases + +- `czip` - Create zip archive +- `xzip` - Extract zip archive +- `lzip` - List contents + +### Compression Tools + +#### Gzip + +- `cgz` - Compress with gzip +- `xgz` - Extract gzip + +#### Bzip2 + +- `cbz` - Compress with bzip2 +- `xbz` - Extract bzip2 + +#### XZ + +- `cxz` - Compress with xz +- `xxz` - Extract xz + +#### Zstandard + +- `czst` - Compress with zstd +- `xzst` - Extract zstd + +#### LZ4 -This code provides a set of command aliases to help users compress and -extract files and directories in various formats on a Unix-based system. +- `clz4` - Compress with lz4 +- `xlz4` - Extract lz4 -The following compression formats are supported: +### Features -* 7z -* bzip2 -* gzip -* jar -* lz4 -* lzma -* lzo -* pigz -* tar -* xz -* zstd -* zip +- Automatic format detection +- Tab completion for the extract command +- Error handling with helpful messages +- Large file support with streaming +- Archive integrity checking +- Content listing +- Cross-platform compatibility -These aliases enable users to compress or extract files and directories -quickly by using simple commands. Here are examples for each operation: +### Usage Examples -* To compress a directory to a 7z file: `compress_7z ` -* To extract from a 7z file: `extract_7z ` +```bash +# Extract any supported archive +extract archive.tar.gz -Similar commands apply for all supported formats, ensuring ease of use. +# Create a tar.gz archive +ctgz output.tar.gz folder/ -**New Features:** +# List contents of a zip file +lzip archive.zip -* Defensive coding practices ensure aliases are only defined if the required -archive programs are present, improving the script's robustness. -* Enhanced portability with updates to support a wider range of archive formats -and systems. +# Compress a large file +compress_large xz largefile.dat -Please note that some of the compression formats may require additional -software to be installed on your system. +# Create a 7z archive with maximum compression +a7z a -mx=9 archive.7z files/ -Enjoy the convenience of quickly compressing and extracting files and -directories with these command aliases! +# Test archive integrity +t7z archive.7z +``` [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg diff --git a/lib/aliases/archives/archives.aliases.sh b/lib/aliases/archives/archives.aliases.sh index f85117c2..48dd3f88 100644 --- a/lib/aliases/archives/archives.aliases.sh +++ b/lib/aliases/archives/archives.aliases.sh @@ -1,157 +1,143 @@ #!/usr/bin/env bash - -################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Script: archives.aliases.sh -# Version: 0.2.469 -# Author: @wwdseb -# Copyright (c) 2015-2025. All rights reserved -# Description: -# This script defines aliases for common archive operations. It provides -# shortcuts for compressing and extracting various types of archive files. -# Website: https://dotfiles.io +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Archive and Compression Management +# Made with β™₯ by Sebastien Rousseau # License: MIT -################################################################################ - -# πŸ…°πŸ†πŸ…²πŸ…·πŸ…ΈπŸ†…πŸ…΄πŸ†‚ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - -## Check for existence of archive programs -if type 7z &> /dev/null; then - alias compress_7z='7z a' - alias extract_7z='7z x' -fi +# This script provides functions and aliases for handling various archive formats. + +#----------------------------------------------------------------------------- +# Helper Functions +#----------------------------------------------------------------------------- +# Check if a command exists +command_exists() { + command -v "$1" >/dev/null 2>&1 +} -if type tar &> /dev/null; then - alias compress_tar='tar -cvf' - alias extract_tar='tar -xvf' - alias compress_tar_gzip='tar -zcvf' - alias extract_tar_gzip='tar -zxvf' - alias compress_tar_bzip2='tar -cvjf' - alias extract_tar_bzip2='tar -xvjf' -fi +# Extract various archive formats +extract() { + if [ -z "$1" ]; then + echo "Usage: extract " + return 1 + fi + + if [ ! -f "$1" ]; then + echo "Error: '$1' is not a valid file" + return 1 + fi + + case "$1" in + *.tar.bz2|*.tbz2) tar xvjf "$1" ;; + *.tar.gz|*.tgz) tar xvzf "$1" ;; + *.tar.xz) tar xvJf "$1" ;; + *.tar.zst) tar --zstd -xvf "$1" ;; + *.tar) tar xvf "$1" ;; + *.bz2) bunzip2 "$1" ;; + *.gz) gunzip "$1" ;; + *.rar) unrar x "$1" ;; + *.zip) unzip "$1" ;; + *.Z) uncompress "$1" ;; + *.7z) 7z x "$1" ;; + *.zst) unzstd "$1" ;; + *.xz) unxz "$1" ;; + *.lz4) lz4 -d "$1" ;; + *) echo "Error: '$1' cannot be extracted" && return 1 ;; + esac +} -if type jar &> /dev/null; then - alias compress_jar='jar -cvf' - alias extract_jar='jar -xvf' -fi +# Compress large files with flexible format support +compress_large() { + if [ -z "$1" ] || [ -z "$2" ]; then + echo "Usage: compress_large [output_file]" + return 1 + fi + + local format="$1" + local input="$2" + local output="${3:-${input}.${format}}" + + if [ ! -f "$input" ]; then + echo "Error: '$input' is not a valid file" + return 1 + fi + + case "$format" in + gz) gzip -c "$input" > "$output" ;; + bz2) bzip2 -c "$input" > "$output" ;; + xz) xz -c "$input" > "$output" ;; + zst) zstd -c "$input" > "$output" ;; + lz4) lz4 -c "$input" > "$output" ;; + *) echo "Error: Unsupported format '$format'" && return 1 ;; + esac + echo "Compressed '$input' to '$output'" +} -if type xz &> /dev/null; then - alias compress_xz='tar -cvJf' - alias extract_xz='tar -xvJf' +#----------------------------------------------------------------------------- +# Aliases for Compression Tools +#----------------------------------------------------------------------------- +# 7-Zip +if command_exists 7z; then + alias a7z='7z a' # Create 7z archive + alias x7z='7z x' # Extract 7z archive + alias l7z='7z l' # List contents of 7z archive + alias t7z='7z t' # Test 7z archive integrity fi -if type zip &> /dev/null; then - alias compress_zip='zip -r' - alias extract_zip='unzip' +# Tar +if command_exists tar; then + alias ctar='tar -cvf' # Create tar archive + alias xtar='tar -xvf' # Extract tar archive + alias ltar='tar -tvf' # List contents of tar archive + alias ctgz='tar -zcvf' # Create tar.gz archive + alias xtgz='tar -zxvf' # Extract tar.gz archive + alias ctbz='tar -jcvf' # Create tar.bz2 archive + alias xtbz='tar -jxvf' # Extract tar.bz2 archive + alias ctxz='tar -Jcvf' # Create tar.xz archive + alias xtxz='tar -Jxvf' # Extract tar.xz archive + alias ctzst='tar --zstd -cvf' # Create tar.zst archive + alias xtzst='tar --zstd -xvf' # Extract tar.zst archive fi -if type zstd &> /dev/null; then - alias compress_zstd='zstd -zcvf' - alias extract_zstd='zstd -zxvf' +# Zip +if command_exists zip; then + alias czip='zip -r' # Create zip archive + alias xzip='unzip' # Extract zip archive + alias lzip='unzip -l' # List contents of zip archive fi -if type gzip &> /dev/null; then - alias compress_gzip='gzip -cv' - alias extract_gzip='gzip -dv' +# Compression Tools +if command_exists gzip; then + alias cgz='gzip -cv' # Compress with gzip + alias xgz='gzip -dv' # Extract gzip fi -if type bzip2 &> /dev/null; then - alias compress_bzip2='bzip2 -zkvf' - alias extract_bzip2='bzip2 -dkvf' +if command_exists bzip2; then + alias cbz='bzip2 -zk' # Compress with bzip2 + alias xbz='bzip2 -dk' # Extract bzip2 fi -if type lzop &> /dev/null; then - alias compress_lzop='lzop -cv' - alias extract_lzop='lzop -dv' +if command_exists xz; then + alias cxz='xz -z' # Compress with xz + alias xxz='xz -d' # Extract xz fi -if type lz4 &> /dev/null; then - alias compress_lz4='lz4 -zcv' - alias extract_lz4='lz4 -dcv' +if command_exists zstd; then + alias czst='zstd -z' # Compress with zstd + alias xzst='zstd -d' # Extract zstd fi -if type pigz &> /dev/null; then - alias compress_pigz='pigz -zkvf' - alias extract_pigz='pigz -dkvf' +if command_exists lz4; then + alias clz4='lz4 -zc' # Compress with lz4 + alias xlz4='lz4 -dc' # Extract lz4 fi -# πŸ…³πŸ…΄πŸ…΅πŸ…΄πŸ…½πŸ†‚πŸ…ΈπŸ†…πŸ…΄ πŸ…²πŸ…ΎπŸ…³πŸ…ΈπŸ…½πŸ…Ά - -# Ensure valid arguments are passed -function compress_file() { - local archive_type="$1" - case "${archive_type}" in - 7z|tar|jar|xz|zip|zstd|gzip|bzip2|lzop|lz4|pigz) - alias "compress_${archive_type}" "${archive_type} -cvf" - ;; - *) - echo "Unsupported archive type: ${archive_type}" - return 1 - ;; - esac -} - -function extract_file() { - local archive_type="$1" - case "${archive_type}" in - 7z|tar|jar|xz|zip|zstd|gzip|bzip2|lzop|lz4|pigz) - alias "extract_${archive_type}" "${archive_type} -xvf" - ;; - *) - echo "Unsupported archive type: ${archive_type}" - return 1 - ;; - esac -} - -# Handle large files by piping outputs -function compress_large_file() { - local archive_type="$1" - case "${archive_type}" in - 7z|tar|jar|xz|zip|zstd|gzip|bzip2|lzop|lz4|pigz) - alias "compress_${archive_type}" "${archive_type} -cvf -" - ;; - *) - echo "Unsupported archive type: ${archive_type}" - return 1 - ;; - esac -} - -function extract_large_file() { - local archive_type="$1" - case "${archive_type}" in - 7z|tar|jar|xz|zip|zstd|gzip|bzip2|lzop|lz4|pigz) - alias "extract_${archive_type}" "${archive_type} -xvf -" - ;; - *) - echo "Unsupported archive type: ${archive_type}" - return 1 - ;; - esac -} - -# πŸ…ΏπŸ…ΎπŸ†πŸ†ƒπŸ…°πŸ…±πŸ…ΈπŸ…»πŸ…ΈπŸ†ƒπŸ†ˆ - -function set_alias() { - local program="$1" - local flags="$2" - # shellcheck disable=SC2250,SC2139 - alias "compress_$program"="${program} ${flags}" - +#----------------------------------------------------------------------------- +# Tab Completion for Extract +#----------------------------------------------------------------------------- +_extract_completion() { + local cur=${COMP_WORDS[COMP_CWORD]} + COMPREPLY=($(compgen -f -X '!*.*(tar.bz2|tbz2|tar.gz|tgz|tar.xz|tar.zst|tar|bz2|gz|rar|zip|Z|7z|zst|xz|lz4)' -- "$cur")) } +complete -F _extract_completion extract -# Set better defaults in case archive programs are missing -set_alias compress_bz2 bzip2 '-zkvf' -set_alias compress_lz4 lz4 '-zcv' -set_alias compress_lzma xz '-zcvf' -set_alias compress_lzo lzop '-cv' -set_alias compress_pgz pigz '-zkvf' -set_alias compress_tbz2 tar '-cvjf' -set_alias compress_tgz tar '--use-compress-program=pigz -cvf' -set_alias compress_tgz tar '-zcvf' -set_alias compress_tlzo tar '--lzip -cvf' -set_alias compress_txz tar '-cvJf' -set_alias compress_tzst tar '--zstd -cvf' -set_alias compress_zlib gzip '-cv' -set_alias compress_zstd zstd '-zcvf' +# Export functions for subshells +export -f extract +export -f compress_large diff --git a/package.json b/package.json index f93ff41d..52c290b8 100644 --- a/package.json +++ b/package.json @@ -26,15 +26,15 @@ ], "description": "Dotfiles - A set of macOS / Linux and Windows configuration files - Simply designed to fit your shell life.", "devDependencies": { - "@types/node": "^20.11.19", - "compressing": "^1.10.0", - "filesizes": "^0.1.2", + "@types/node": "22.10.2", + "compressing": "1.10.1", + "filesizes": "0.1.2", "fs-extra": "11.2.0", - "husky": "^9.0.11", + "husky": "9.1.7", "jsmin": "^1.0.1", - "rimraf": "^5.0.5", - "typescript": "^5.3.3", - "winston": "^3.11.0" + "rimraf": "6.0.1", + "typescript": "5.7.2", + "winston": "3.17.0" }, "directories": { "bin": "./bin", From 677db19ec71ffd85f75a87db6776dbf640abd227 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 10:18:18 +0000 Subject: [PATCH 05/17] fix(dotfiles): :bug: fix codacy issues --- lib/aliases/archives/README.md | 3 ++- lib/aliases/rust/README.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/aliases/archives/README.md b/lib/aliases/archives/README.md index cbd4058b..3951dc1d 100644 --- a/lib/aliases/archives/README.md +++ b/lib/aliases/archives/README.md @@ -15,7 +15,8 @@ Simply designed to fit your shell life 🐚 ## πŸ…°πŸ†πŸ…²πŸ…·πŸ…ΈπŸ†…πŸ…΄ πŸ…°πŸ…½πŸ…³ πŸ…²πŸ…ΎπŸ…ΌπŸ…ΏπŸ†πŸ…΄πŸ†‚πŸ†‚πŸ…ΈπŸ…ΎπŸ…½ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ -This module provides comprehensive tools for handling various archive and compression formats. +This module provides comprehensive tools for handling various archive and +compression formats. ### Universal Extract Function diff --git a/lib/aliases/rust/README.md b/lib/aliases/rust/README.md index f687620d..c8d2315c 100644 --- a/lib/aliases/rust/README.md +++ b/lib/aliases/rust/README.md @@ -15,7 +15,8 @@ Simply designed to fit your shell life 🐚 ## πŸ†πŸ†„πŸ†‚πŸ†ƒπŸ†„πŸ…Ώ πŸ…°πŸ…½πŸ…³ πŸ…²πŸ…°πŸ†πŸ…ΆπŸ…Ύ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ -This code provides a comprehensive set of aliases for Rust development using `cargo` and `rustup` commands. +This code provides a comprehensive set of aliases for Rust development +using `cargo` and `rustup` commands. ### Cargo Aliases From 08cb525ae2f8397287f384a511ce359c026108e2 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 14:33:22 +0000 Subject: [PATCH 06/17] fix(dotfiles): :bug: fix cd.aliases --- lib/aliases/cd/README.md | 147 ++++++++++++++++++++++++++--------- lib/aliases/cd/cd.aliases.sh | 128 +++++++++++++++++------------- 2 files changed, 185 insertions(+), 90 deletions(-) diff --git a/lib/aliases/cd/README.md b/lib/aliases/cd/README.md index 4a490590..c8e27d76 100644 --- a/lib/aliases/cd/README.md +++ b/lib/aliases/cd/README.md @@ -1,65 +1,140 @@ - dotfiles logo - # Dotfiles (v0.2.469) -Designed to seamlessly enhance your shell environment 🐚 +**Seamlessly enhance your shell environment 🐚** ![Dotfiles banner][banner] -## πŸ…²πŸ…³ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ +--- + +## πŸš€ Introduction + +This repository includes a robust set of shell aliases and scripts designed to streamline your command-line experience. The `cd` aliases script simplifies filesystem navigation with: + +- **Dynamic error handling** +- **Automatic directory listing** +- **Customizable paths for frequent directories** + +--- + +## πŸ› οΈ Features + +### 🌟 Navigation Shortcuts + +| Alias | Description | +|------------------|--------------------------------------| +| `-` | Switch to the previous directory | +| `..`, `...` | Ascend one or two levels in the tree | +| `....`, `.....` | Ascend three or four levels | +| `hom` | Navigate to the home directory (`~`) | + +--- + +### πŸ“‚ Custom Directory Access + +Quickly access frequently used directories with predefined shortcuts. You can customize these paths to fit your needs: + +| Alias | Directory Path | Description | +|-------|--------------------------|------------------------| +| `app` | `${HOME}/Applications` | Applications directory | +| `cod` | `${HOME}/Code` | Code directory | +| `des` | `${HOME}/Desktop` | Desktop directory | +| `doc` | `${HOME}/Documents` | Documents directory | +| `dot` | `${HOME}/.dotfiles` | Dotfiles directory | +| `dow` | `${HOME}/Downloads` | Downloads directory | +| `mus` | `${HOME}/Music` | Music directory | +| `pic` | `${HOME}/Pictures` | Pictures directory | +| `vid` | `${HOME}/Videos` | Videos directory | + +--- + +### πŸ”§ System Directories + +Effortlessly navigate to critical system directories: + +| Alias | Directory Path | Description | +|-------|----------------|--------------------------------| +| `etc` | `/etc` | System configuration directory | +| `var` | `/var` | Variable files directory | +| `tmp` | `/tmp` | Temporary files directory | + +--- + +### βš™οΈ Enhanced Customization + +- **Dynamic Directory Paths**: Customize aliases through environment variables +- **Error Handling**: Provides clear messages for invalid directories +- **Optional Directory Listing**: Automatically lists contents after navigation +- **Tab Completion**: Supports custom tab completion for aliases + +--- + +## πŸ“¦ Installation + +1. **Clone the repository**: + ```bash + git clone https://github.com/sebastienrousseau/dotfiles.git + ``` + +2. **Source the script in your shell configuration**: + + ```bash + echo 'source /path/to/dotfiles/cd.sh' >> ~/.bashrc + ``` + +3. **Reload your shell**: + + ```bash + source ~/.bashrc + ``` + +--- + +## πŸ§‘β€πŸ’» Usage + +Here are some examples of how you can use the `cd` aliases: -This set of `cd` command aliases provides an intuitive and efficient way to -navigate your filesystem. Incorporating dynamic error handling, optional -directory listing, and customization for an improved command-line experience. +```bash +# Navigate to the Code directory +cod -### Setup +# Ascend two levels in the directory tree +... -To use these aliases, integrate the script into your `.bashrc` or `.bash_profile`. +# Access the Documents directory +doc -### Navigation Shortcuts +# Navigate to the system configuration directory +etc +``` -* `-`: Go to the previous directory. -* `..`, `...`, `....`, `.....`: Ascend one to four levels in the directory tree. -* `~`: Navigate to the home directory. +--- -### Custom Directory Access +## πŸ“š Documentation -Leverage aliases for quick access to frequently visited directories: +For advanced configuration and detailed usage examples, visit the [official documentation](https://dotfiles.io). -* `app`: Applications directory -* `cod`: Code directory -* `des`: Desktop directory -* `doc`: Documents directory -* `dot`: Dotfiles directory -* `dow`: Downloads directory -* `mus`: Music directory -* `pic`: Pictures directory -* `vid`: Videos directory +--- -### System Directories +## πŸ›‘οΈ License -Quickly access system directories: +This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). -* `etc`: System configuration (`/etc`) -* `var`: Variable files (`/var`) -* `tmp`: Temporary files (`/tmp`) +--- -### Enhanced Customization +## πŸ‘¨β€πŸ’» Author -Customize directory paths through environment variables to suit your system's -structure and preferences. Use concise aliases (`app`, `cod`, `des`, etc.) for -efficient navigation. +Created with β™₯ by [Sebastien Rousseau](https://sebastienrousseau.com) -For a detailed guide on configuring and using these aliases, plus additional -information on each command, visit our [documentation](https://dotfiles.io). +- Website: [https://sebastienrousseau.com](https://sebastienrousseau.com) +- GitHub: [https://github.com/sebastienrousseau](https://github.com/sebastienrousseau) [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg diff --git a/lib/aliases/cd/cd.aliases.sh b/lib/aliases/cd/cd.aliases.sh index 98bbaaf9..8fc5dfed 100644 --- a/lib/aliases/cd/cd.aliases.sh +++ b/lib/aliases/cd/cd.aliases.sh @@ -1,56 +1,43 @@ #!/usr/bin/env bash - ################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Author: Sebastien Rousseau -# Copyright: 2015-2024. All rights reserved -# Description: Enhanced `cd` command aliases with checks, functions, and customization. +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Change directory aliases +# Made with β™₯ by Sebastien Rousseau # License: MIT -# Script: cd.aliases.sh -# Version: 0.2.469 -# Website: https://dotfiles.io - -# Usage: -# Customize directory paths via variables and use aliases to navigate. -# Example: `cod` to go to the Code directory, `..` to go up one directory. - -# Configuration -DOC_DIR="${HOME}/Documents" -VID_DIR="${HOME}/Videos" -# Add more configurable paths here +# This script provides functions and aliases to quickly change directories. +################################################################################ -# Check if directory exists and change to it, listing contents optionally +#----------------------------------------------------------------------------- +# Helper Functions +#----------------------------------------------------------------------------- +# Function to change directory with optional listing change_directory() { - local path="$1" + local path="$1" + local list_contents="${2:-false}" - if [[ -d "${path}" ]]; then - cd "${path}" || exit # Exit if cd fails - else - echo "Directory '${path}' does not exist." - fi + if [[ -d "${path}" ]]; then + cd "${path}" || { echo "Failed to change to directory: ${path}"; return 1; } + echo "Changed directory to: ${path}" + if [[ "${list_contents}" == "true" ]]; then + ls -lh --group-directories-first + fi + else + echo "Error: Directory '${path}' does not exist." + return 1 + fi } -# Parent Directory Shortcuts -alias -- -='cd -' -alias ..='cd ..' -alias ...='cd ../..' -alias ....='cd ../../..' -alias .....='cd ../../../..' - -# Home Directory Shortcut -alias hom='change_directory "${HOME}" true' - -# Frequently Used Directories -alias doc='change_directory "$DOC_DIR" true' # Documents -alias vid='change_directory "$VID_DIR" true' # Videos -# Define more aliases like the above for other directories - -# System Directories (consider checks for system-specific paths) -alias etc='change_directory "/etc" true' -alias var='change_directory "/var" true' -alias tmp='change_directory "/tmp" true' +# Add tab completion for custom aliases +_cd_alias_completion() { + local cur=${COMP_WORDS[COMP_CWORD]} + local dirs=("app" "cod" "des" "doc" "dot" "dow" "mus" "pic" "vid" "etc" "var" "tmp") + COMPREPLY=($(compgen -W "${dirs[*]}" -- "$cur")) +} +complete -F _cd_alias_completion app cod des doc dot dow mus pic vid etc var tmp -# Frequently Used Directories with Improved Error Handling and Customization +#----------------------------------------------------------------------------- +# Frequently Used Directory Variables +#----------------------------------------------------------------------------- +HOME_DIR="${HOME}" APP_DIR="${HOME}/Applications" CODE_DIR="${HOME}/Code" DESK_DIR="${HOME}/Desktop" @@ -61,13 +48,46 @@ MUSIC_DIR="${HOME}/Music" PICS_DIR="${HOME}/Pictures" VIDS_DIR="${HOME}/Videos" -# Define functions for each alias with checks and optional ls -alias app='change_directory "$APP_DIR" true' # Applications -alias cod='change_directory "$CODE_DIR" true' # Code -alias des='change_directory "$DESK_DIR" true' # Desktop -alias doc='change_directory "$DOCS_DIR" true' # Documents -alias dot='change_directory "$DOTF_DIR" true' # Dotfiles -alias dow='change_directory "$DOWN_DIR" true' # Downloads -alias mus='change_directory "$MUSIC_DIR" true' # Music -alias pic='change_directory "$PICS_DIR" true' # Pictures -alias vid='change_directory "$VIDS_DIR" true' # Videos +#----------------------------------------------------------------------------- +# Parent Directory Shortcuts +#----------------------------------------------------------------------------- +alias -- -='cd -' # Go to the previous directory +alias ..='cd ..' # Go up one level +alias ...='cd ../..' # Go up two levels +alias ....='cd ../../..' # Go up three levels +alias .....='cd ../../../..' # Go up four levels + +#----------------------------------------------------------------------------- +# Home and Frequently Used Directories +#----------------------------------------------------------------------------- +alias app='change_directory "${APP_DIR}" true' # Applications +alias cod='change_directory "${CODE_DIR}" true' # Code +alias des='change_directory "${DESK_DIR}" true' # Desktop +alias doc='change_directory "${DOCS_DIR}" true' # Documents +alias dot='change_directory "${DOTF_DIR}" true' # Dotfiles +alias dow='change_directory "${DOWN_DIR}" true' # Downloads +alias hom='change_directory "${HOME_DIR}" true' # Home Directory +alias mus='change_directory "${MUSIC_DIR}" true' # Music +alias pic='change_directory "${PICS_DIR}" true' # Pictures +alias vid='change_directory "${VIDS_DIR}" true' # Videos + +#----------------------------------------------------------------------------- +# System Directories +#----------------------------------------------------------------------------- +if [[ -d "/etc" ]]; then + alias etc='change_directory "/etc" true' # System configuration directory +fi + +if [[ -d "/var" ]]; then + alias var='change_directory "/var" true' # System variable data directory +fi + +if [[ -d "/tmp" ]]; then + alias tmp='change_directory "/tmp" true' # Temporary files directory +fi + +#----------------------------------------------------------------------------- +# Dynamic Features +#----------------------------------------------------------------------------- +# Export the function for use in subshells +export -f change_directory From 6f3318a4dd2a9736c00df4ea51331a588993caa6 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 15:41:03 +0000 Subject: [PATCH 07/17] fix(dotfiles): :bug: fix chmod.aliases.sh --- lib/aliases/chmod/README.md | 233 +++++++++++++++++------------ lib/aliases/chmod/chmod.aliases.sh | 126 +++++++++------- 2 files changed, 210 insertions(+), 149 deletions(-) diff --git a/lib/aliases/chmod/README.md b/lib/aliases/chmod/README.md index ce7302c6..e5d93d12 100644 --- a/lib/aliases/chmod/README.md +++ b/lib/aliases/chmod/README.md @@ -1,109 +1,154 @@ - dotfiles logo - # Dotfiles (v0.2.469) -Simply designed to fit your shell life 🐚 +**Simply designed to fit your shell life 🐚** ![Dotfiles banner][banner] -## πŸ…²πŸ…·πŸ…ΌπŸ…ΎπŸ…³ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - -These aliases provide shortcuts for the chmod command to help you -quickly change the permissions of files and directories. To use them, -add the following lines to your .bashrc or .bash_profile file. - -### Change permissions - -- `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. -- `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. -- `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. -- `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. -- `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. -- `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. -- `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. -- `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. -- `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. - -### Change ownership - -- `chgrp`: Change group ownership of files or directories. -- `chgrpr`: Change group ownership of files or directories recursively. -- `chgrpu`: Change group ownership of files or directories recursively - to the current user. -- `chmod`: Change file mode bits. -- `chmodr`: Change file mode bits recursively. -- `chmodu`: Change file mode bits recursively to the current user. -- `chmox`: Make a file executable. -- `chown`: Change file owner and group. -- `chownr`: Change file owner and group recursively. -- `chownu`: Change file owner and group recursively to the current user. - -### Set permissions for specific file types - -- `755d`: Set permissions of all directories to rwxr-xr-x. -- `644f`: Set permissions of all files to rw-r--r--. - -### Set permissions for specific user types - -- `u+x`: Add execute permission for the owner of the file. -- `u-x`: Remove execute permission for the owner of the file. -- `u+w`: Add write permission for the owner of the file. -- `u-w`: Remove write permission for the owner of the file. -- `u+r`: Add read permission for the owner of the file. -- `u-r`: Remove read permission for the owner of the file. -- `g+x`: Add execute permission for the group owner of the file. -- `g-x`: Remove execute permission for the group owner of the file. -- `g+w`: Add write permission for the group owner of the file. -- `g-w`: Remove write permission for the group owner of the file. -- `g+r`: Add read permission for the group owner of the file. -- `g-r`: Remove read permission for the group owner of the file. -- `o+x`: Add execute permission for others. -- `o-x`: Remove execute permission for others. -- `o+w`: Add write permission for others. -- `o-w`: Remove write permission for others. -- `o+r`: Add read permission for others. -- `o-r`: Remove read permission for others. - -### Set permissions based on octal notation - -- `000`: Set permissions to ---------- -- `400`: Set permissions to r-------- -- `444`: Set permissions to r--r--r-- -- `600`: Set permissions to rw------- -- `644`: Set permissions to rw-r--r--. -- `664`: Set permissions to rw-rw-r--. -- `755`: Set permissions to rwxr-xr-x. -- `775`: Set permissions to rwxrwxr-x. -- `777`: Set permissions to rwxrwxrwx. +--- + +## πŸš€ Introduction + +This script provides an enhanced set of shortcuts and functions for the `chmod` command, making it easier to manage file and directory permissions. With features like input validation, recursive confirmation, and user-friendly aliases, you can efficiently customize permissions for files and directories. + +--- + +## πŸ› οΈ Features + +### 🌟 Permission Aliases + +Quickly apply common permission settings with pre-defined aliases: + +| Alias | Permissions | Description | +|--------------|------------------|-----------------------------------------------------------------------------| +| `chmod_000` | `----------` | No permissions for anyone | +| `chmod_400` | `r--------` | Read-only for the owner | +| `chmod_444` | `r--r--r--` | Read-only for everyone | +| `chmod_600` | `rw-------` | Read/write for the owner | +| `chmod_644` | `rw-r--r--` | Read/write for the owner, read-only for others | +| `chmod_666` | `rw-rw-rw-` | Read/write for everyone | +| `chmod_755` | `rwxr-xr-x` | Full permissions for the owner, read/execute for others | +| `chmod_764` | `rwxrw-r--` | Full permissions for the owner, read/write for the group, read-only for others | +| `chmod_777` | `rwxrwxrwx` | Full permissions for everyone | + +--- + +### πŸ”§ Recursive Confirmation for Permissions + +The `change_permission` function allows you to recursively apply permissions with a confirmation prompt, displaying the number of items affected: + +```bash +change_permission 755 /path/to/directory -R +``` + +--- + +### πŸ“‚ User, Group, and Others Shortcuts + +Fine-tune permissions for specific user groups (owner, group, or others): + +| Alias | Description | +|---------------|--------------------------------------------| +| `chmod_u+x` | Add execute permission for the owner | +| `chmod_u-x` | Remove execute permission for the owner | +| `chmod_u+w` | Add write permission for the owner | +| `chmod_u-w` | Remove write permission for the owner | +| `chmod_u+r` | Add read permission for the owner | +| `chmod_u-r` | Remove read permission for the owner | +| `chmod_g+x` | Add execute permission for the group | +| `chmod_g-x` | Remove execute permission for the group | +| `chmod_g+w` | Add write permission for the group | +| `chmod_g-w` | Remove write permission for the group | +| `chmod_g+r` | Add read permission for the group | +| `chmod_g-r` | Remove read permission for the group | +| `chmod_o+x` | Add execute permission for others | +| `chmod_o-x` | Remove execute permission for others | +| `chmod_o+w` | Add write permission for others | +| `chmod_o-w` | Remove write permission for others | +| `chmod_o+r` | Add read permission for others | +| `chmod_o-r` | Remove read permission for others | + +--- + +### πŸ“„ Custom Aliases for File Types + +Set permissions for specific file types with ease: + +| Alias | Description | +|--------------|------------------------------------------------| +| `chmod_755d` | Set permissions of all directories to `rwxr-xr-x` | +| `chmod_644f` | Set permissions of all files to `rw-r--r--` | + +--- + +## πŸ“¦ Installation + +1. Clone this repository: + + ```bash + git clone https://github.com/sebastienrousseau/dotfiles.git + ``` + +2. Source the script in your shell configuration file: + + ```bash + echo 'source /path/to/dotfiles/chmod.sh' >> ~/.bashrc + ``` + +3. Reload your shell: + + ```bash + source ~/.bashrc + ``` + +--- + +## πŸ§‘β€πŸ’» Usage + +Here are some examples of how to use the `chmod` aliases and functions: + +- Apply common permissions: + + ```bash + chmod_644 /path/to/file + chmod_755 /path/to/directory + ``` + +- Modify user, group, or others' permissions: + + ```bash + chmod_u+x /path/to/script + chmod_g-w /path/to/file + chmod_o+r /path/to/file + ``` + +- Recursively set permissions with confirmation: + + ```bash + change_permission 755 /path/to/directory -R + ``` + +--- + +## πŸ›‘οΈ License + +This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). See the `LICENSE` file for more information. + +--- + +## πŸ‘¨β€πŸ’» Author + +Created with β™₯ by [Sebastien Rousseau](https://sebastienrousseau.com) + +- Website: [https://sebastienrousseau.com](https://sebastienrousseau.com) +- GitHub: [https://github.com/sebastienrousseau](https://github.com/sebastienrousseau) [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg diff --git a/lib/aliases/chmod/chmod.aliases.sh b/lib/aliases/chmod/chmod.aliases.sh index 6ded927a..ad0c6330 100644 --- a/lib/aliases/chmod/chmod.aliases.sh +++ b/lib/aliases/chmod/chmod.aliases.sh @@ -1,91 +1,107 @@ #!/usr/bin/env bash ################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Script: chmod.aliases.sh -# Version: 0.2.469 -# Author: @wwdseb -# Copyright (c) 2015-2025. All rights reserved -# Description: Enhanced chmod command aliases with safety features, input validation, and structured organization. -# Website: https://dotfiles.io +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Change directory aliases +# Made with β™₯ by Sebastien Rousseau # License: MIT +# Enhanced chmod command aliases with safety features, input validation, and structured organization. ################################################################################ -# Ensuring chmod command is available + +# Ensure chmod exists before proceeding if command -v chmod >/dev/null; then - # Validate input for permission and path - function validate_input() { + #----------------------------------------------------------------------------- + # Function: Validate input + # Description: Checks permission format and path validity. + #----------------------------------------------------------------------------- + validate_input() { local permission="$1" local path="$2" - # Validate permission pattern (e.g., numeric octal) + + # Check permission format (e.g., numeric octal: ###) if ! [[ ${permission} =~ ^[0-7]{3}$ ]]; then - echo "Invalid permission format: ${permission}. Expected format: ### (e.g., 644)." + echo "Error: Invalid permission format '${permission}'. Expected format: ### (e.g., 644)." return 1 fi - # Validate path existence + + # Check if the path exists if ! [[ -e "${path}" ]]; then - echo "Path does not exist: ${path}." + echo "Error: Path does not exist: '${path}'." return 1 fi + return 0 } - # Function to change permissions with confirmation for recursive changes - function change_permission() { + #----------------------------------------------------------------------------- + # Function: Change permissions + # Description: Applies chmod with validation and optional recursive handling. + #----------------------------------------------------------------------------- + change_permission() { local permission="$1" local path="$2" - local recursive="$3" - local confirm + local recursive="${3:-}" - # Validate inputs + # Validate input if ! validate_input "${permission}" "${path}"; then return 1 fi - # Confirmation for recursive changes + # Handle recursive changes with confirmation if [[ "${recursive}" == "-R" ]]; then - read -rp "Confirm recursive change to ${permission} for ${path}? (y/N): " confirm + local count + count=$(find "${path}" 2>/dev/null | wc -l) + read -rp "Confirm recursive change to '${permission}' for '${path}' (${count} items)? (y/N): " confirm if [[ ${confirm} != [yY] ]]; then echo "Operation cancelled." - return + return 1 fi fi - chmod "${recursive}" "${permission}" "${path}" && echo "Permissions set to ${permission} on ${path}" + # Apply permissions + chmod "${recursive}" "${permission}" "${path}" && \ + echo "Permissions set to '${permission}' on '${path}'" } - # Alias definitions using the function for common permissions - alias perm000='change_permission 000' - alias perm400='change_permission 400' - alias perm444='change_permission 444' - alias perm600='change_permission 600' - alias perm644='change_permission 644' - alias perm666='change_permission 666' - alias perm755='change_permission 755' - alias perm764='change_permission 764' - alias perm777='change_permission 777' - - # Shortcuts to set permissions for specific user types - alias u+x='chmod u+x' # u+x: Add execute permission for the owner of the file. - alias u-x='chmod u-x' # u-x: Remove execute permission for the owner of the file. - alias u+w='chmod u+w' # u+w: Add write permission for the owner of the file. - alias u-w='chmod u-w' # u-w: Remove write permission for the owner of the file. - alias u+r='chmod u+r' # u+r: Add read permission for the owner of the file. - alias u-r='chmod u-r' # u-r: Remove read permission for the owner of the file. - - alias g+x='chmod g+x' # g+x: Add execute permission for the group owner of the file. - alias g-x='chmod g-x' # g-x: Remove execute permission for the group owner of the file. - alias g+w='chmod g+w' # g+w: Add write permission for the group owner of the file. - alias g-w='chmod g-w' # g-w: Remove write permission for the group owner of the file. - alias g+r='chmod g+r' # g+r: Add read permission for the group owner of the file. - alias g-r='chmod g-r' # g-r: Remove read permission for the group owner of the file. - - alias o+x='chmod o+x' # o+x: Add execute permission for others. - alias o-x='chmod o-x' # o-x: Remove execute permission for others. - alias o+w='chmod o+w' # o+w: Add write permission for others. - alias o-w='chmod o-w' # o-w: Remove write permission for others. - alias o+r='chmod o+r' # o+r: Add read permission for others. - alias o-r='chmod o-r' # o-r: Remove read permission for others. + #----------------------------------------------------------------------------- + # Common Permission Aliases + #----------------------------------------------------------------------------- + alias chmod_000='change_permission 000' # No permissions + alias chmod_400='change_permission 400' # Read-only for owner + alias chmod_444='change_permission 444' # Read-only for all + alias chmod_600='change_permission 600' # Read/write for owner + alias chmod_644='change_permission 644' # Read/write for owner, read for others + alias chmod_666='change_permission 666' # Read/write for all + alias chmod_755='change_permission 755' # Full for owner, read/execute for others + alias chmod_764='change_permission 764' # Full for owner, read/write for group + alias chmod_777='change_permission 777' # Full permissions for all + + #----------------------------------------------------------------------------- + # User, Group, and Other Shortcuts + #----------------------------------------------------------------------------- + # User + alias chmod_u+x='chmod u+x' # Add execute for owner + alias chmod_u-x='chmod u-x' # Remove execute for owner + alias chmod_u+w='chmod u+w' # Add write for owner + alias chmod_u-w='chmod u-w' # Remove write for owner + alias chmod_u+r='chmod u+r' # Add read for owner + alias chmod_u-r='chmod u-r' # Remove read for owner + + # Group + alias chmod_g+x='chmod g+x' # Add execute for group + alias chmod_g-x='chmod g-x' # Remove execute for group + alias chmod_g+w='chmod g+w' # Add write for group + alias chmod_g-w='chmod g-w' # Remove write for group + alias chmod_g+r='chmod g+r' # Add read for group + alias chmod_g-r='chmod g-r' # Remove read for group + + # Others + alias chmod_o+x='chmod o+x' # Add execute for others + alias chmod_o-x='chmod o-x' # Remove execute for others + alias chmod_o+w='chmod o+w' # Add write for others + alias chmod_o-w='chmod o-w' # Remove write for others + alias chmod_o+r='chmod o+r' # Add read for others + alias chmod_o-r='chmod o-r' # Remove read for others fi From 02a4b8a7ecf6988566daf8b494ae8d9c690e9c9a Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 15:50:00 +0000 Subject: [PATCH 08/17] docs(dotfiles): :bug: fix codacy issues --- lib/aliases/chmod/README.md | 44 +++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/lib/aliases/chmod/README.md b/lib/aliases/chmod/README.md index e5d93d12..568edc91 100644 --- a/lib/aliases/chmod/README.md +++ b/lib/aliases/chmod/README.md @@ -9,7 +9,7 @@ # Dotfiles (v0.2.469) -**Simply designed to fit your shell life 🐚** +Simply designed to fit your shell life 🐚 ![Dotfiles banner][banner] @@ -17,7 +17,10 @@ ## πŸš€ Introduction -This script provides an enhanced set of shortcuts and functions for the `chmod` command, making it easier to manage file and directory permissions. With features like input validation, recursive confirmation, and user-friendly aliases, you can efficiently customize permissions for files and directories. +This script provides an enhanced set of shortcuts and functions for the +`chmod` command, making it easier to manage file and directory permissions. +With features like input validation, recursive confirmation, and user-friendly +aliases, you can efficiently customize permissions for files and directories. --- @@ -27,23 +30,24 @@ This script provides an enhanced set of shortcuts and functions for the `chmod` Quickly apply common permission settings with pre-defined aliases: -| Alias | Permissions | Description | -|--------------|------------------|-----------------------------------------------------------------------------| -| `chmod_000` | `----------` | No permissions for anyone | -| `chmod_400` | `r--------` | Read-only for the owner | -| `chmod_444` | `r--r--r--` | Read-only for everyone | -| `chmod_600` | `rw-------` | Read/write for the owner | -| `chmod_644` | `rw-r--r--` | Read/write for the owner, read-only for others | -| `chmod_666` | `rw-rw-rw-` | Read/write for everyone | -| `chmod_755` | `rwxr-xr-x` | Full permissions for the owner, read/execute for others | -| `chmod_764` | `rwxrw-r--` | Full permissions for the owner, read/write for the group, read-only for others | -| `chmod_777` | `rwxrwxrwx` | Full permissions for everyone | +| Alias | Permissions | Description | +|--------------|------------------|-------------------------------------------| +| `chmod_000` | `----------` | No permissions for anyone | +| `chmod_400` | `r--------` | Read-only for the owner | +| `chmod_444` | `r--r--r--` | Read-only for everyone | +| `chmod_600` | `rw-------` | Read/write for the owner | +| `chmod_644` | `rw-r--r--` | Read/write for the owner, read-only other | +| `chmod_666` | `rw-rw-rw-` | Read/write for everyone | +| `chmod_755` | `rwxr-xr-x` | Full owner, read/execute for others | +| `chmod_764` | `rwxrw-r--` | Full owner, read/write for the group, | +| `chmod_777` | `rwxrwxrwx` | Full permissions for everyone | --- ### πŸ”§ Recursive Confirmation for Permissions -The `change_permission` function allows you to recursively apply permissions with a confirmation prompt, displaying the number of items affected: +The `change_permission` function allows you to recursively apply permissions +with a confirmation prompt, displaying the number of items affected: ```bash change_permission 755 /path/to/directory -R @@ -82,10 +86,10 @@ Fine-tune permissions for specific user groups (owner, group, or others): Set permissions for specific file types with ease: -| Alias | Description | -|--------------|------------------------------------------------| -| `chmod_755d` | Set permissions of all directories to `rwxr-xr-x` | -| `chmod_644f` | Set permissions of all files to `rw-r--r--` | +| Alias | Description | +|--------------|----------------------------------------------------| +| `chmod_755d` | Set permissions of all directories to `rwxr-xr-x` | +| `chmod_644f` | Set permissions of all files to `rw-r--r--` | --- @@ -140,7 +144,9 @@ Here are some examples of how to use the `chmod` aliases and functions: ## πŸ›‘οΈ License -This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). See the `LICENSE` file for more information. +This project is licensed under the +[MIT License](https://opensource.org/licenses/MIT). See the `LICENSE` file for +more information. --- From b688072c32a51fc36a70ae2ad24c91db4eb5146c Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 15:57:23 +0000 Subject: [PATCH 09/17] =?UTF-8?q?docs(dotfiles):=20=F0=9F=90=9B=20fix=20co?= =?UTF-8?q?dacy=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/aliases/cd/README.md | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/lib/aliases/cd/README.md b/lib/aliases/cd/README.md index c8e27d76..e3f24e15 100644 --- a/lib/aliases/cd/README.md +++ b/lib/aliases/cd/README.md @@ -9,7 +9,7 @@ # Dotfiles (v0.2.469) -**Seamlessly enhance your shell environment 🐚** +Seamlessly enhance your shell environment 🐚 ![Dotfiles banner][banner] @@ -17,7 +17,9 @@ ## πŸš€ Introduction -This repository includes a robust set of shell aliases and scripts designed to streamline your command-line experience. The `cd` aliases script simplifies filesystem navigation with: +This repository includes a robust set of shell aliases and scripts designed to +streamline your command-line experience. The `cd` aliases script simplifies +filesystem navigation with: - **Dynamic error handling** - **Automatic directory listing** @@ -40,7 +42,8 @@ This repository includes a robust set of shell aliases and scripts designed to s ### πŸ“‚ Custom Directory Access -Quickly access frequently used directories with predefined shortcuts. You can customize these paths to fit your needs: +Quickly access frequently used directories with predefined shortcuts. You can +customize these paths to fit your needs: | Alias | Directory Path | Description | |-------|--------------------------|------------------------| @@ -80,21 +83,22 @@ Effortlessly navigate to critical system directories: ## πŸ“¦ Installation 1. **Clone the repository**: - ```bash - git clone https://github.com/sebastienrousseau/dotfiles.git - ``` + +```bash +git clone https://github.com/sebastienrousseau/dotfiles.git +``` -2. **Source the script in your shell configuration**: +1. **Source the script in your shell configuration**: - ```bash - echo 'source /path/to/dotfiles/cd.sh' >> ~/.bashrc - ``` +```bash +echo 'source /path/to/dotfiles/cd.sh' >> ~/.bashrc +``` -3. **Reload your shell**: +1. **Reload your shell**: - ```bash - source ~/.bashrc - ``` +```bash +source ~/.bashrc +``` --- @@ -120,13 +124,15 @@ etc ## πŸ“š Documentation -For advanced configuration and detailed usage examples, visit the [official documentation](https://dotfiles.io). +For advanced configuration and detailed usage examples, visit the +[official documentation](https://dotfiles.io). --- ## πŸ›‘οΈ License -This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). +This project is licensed under the +[MIT License](https://opensource.org/licenses/MIT). --- From 44b1ae9b09a7d8a5f368fe6a46e391bf2dec4268 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 16:11:33 +0000 Subject: [PATCH 10/17] =?UTF-8?q?docs(dotfiles):=20=F0=9F=90=9B=20fix=20co?= =?UTF-8?q?dacy=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/aliases/cd/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aliases/cd/README.md b/lib/aliases/cd/README.md index e3f24e15..6474305f 100644 --- a/lib/aliases/cd/README.md +++ b/lib/aliases/cd/README.md @@ -83,7 +83,7 @@ Effortlessly navigate to critical system directories: ## πŸ“¦ Installation 1. **Clone the repository**: - + ```bash git clone https://github.com/sebastienrousseau/dotfiles.git ``` From b876a8522eba7ee981091172742223d37ca0cafc Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Sat, 14 Dec 2024 19:52:43 +0000 Subject: [PATCH 11/17] =?UTF-8?q?docs(dotfiles):=20=F0=9F=90=9B=20fix=20al?= =?UTF-8?q?iases=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 167 ++++++++++---- lib/aliases.sh | 2 +- lib/aliases/archives/archives.aliases.sh | 123 ++++------ lib/aliases/cd/cd.aliases.sh | 70 ++---- lib/aliases/clear/clear.aliases.sh | 2 +- .../configuration/configuration.aliases.sh | 2 +- lib/aliases/default/default.aliases.sh | 2 +- lib/aliases/list/README.md | 131 +++++++++-- lib/aliases/list/list.aliases.sh | 214 +++++++++++------- lib/configurations.sh | 2 +- lib/configurations/bash/bashrc | 196 +++++++++++++--- lib/functions.sh | 2 +- lib/history.sh | 2 +- lib/paths.sh | 2 +- lib/paths/homebrew/homebrew.paths.sh | 116 ++++++++-- lib/paths/java/java.paths.sh | 122 ++++++++-- lib/paths/maven/maven.paths.sh | 114 ++++++++-- lib/paths/node/node.paths.sh | 90 +++++++- lib/paths/python/python.paths.sh | 166 +++++++++++--- lib/paths/ruby/ruby.paths.sh | 117 ++++++++-- 20 files changed, 1218 insertions(+), 424 deletions(-) diff --git a/Makefile b/Makefile index 8a259f1f..7893fc52 100644 --- a/Makefile +++ b/Makefile @@ -1,51 +1,135 @@ #!/usr/bin/env make -f -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# File: Makefile +# Version: 0.2.469 +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved +# Description: Build automation for dotfiles installation and management +# Website: https://dotfiles.io # License: MIT +################################################################################ +#------------------------------------------------------------------------------ +# Configuration Variables +#------------------------------------------------------------------------------ + +# Default target if no target is specified .DEFAULT_GOAL := help -HOMEDIR:= $(shell pwd) -BANNER:= $(HOMEDIR)/scripts/banner.sh -SHELL := /bin/bash - -.PHONY: backup -backup: # @HELP -backup: ## Backup your current dotfiles. - @$(HOMEDIR)/scripts/backup.sh backup - -.PHONY: clean -clean: # @HELP -clean: ## Removes any previous setup. -clean: - @$(HOMEDIR)/scripts/clean.sh clean - -.PHONY: copy -copy: # @HELP -copy: ## Copy the dotfiles on your system. - @$(HOMEDIR)/scripts/copy.sh copy - -.PHONY: download -download: # @HELP -download: ## Download the dotfiles on your system. - @$(HOMEDIR)/scripts/download.sh download - -.PHONY: build -build: # @HELP -build: ## Run the full installation process. - @$(HOMEDIR)/scripts/build.sh build - -.PHONY: unpack -unpack: # @HELP -unpack: ## Extract the dotfiles to your system. - @$(HOMEDIR)/scripts/unpack.sh unpack - -.PHONY: help -help: # @HELP -help: ## Display the help menu. + +# Define shell and working directory +SHELL := /bin/bash +HOMEDIR := $(shell pwd) +BANNER := $(HOMEDIR)/scripts/banner.sh + +# Script paths +BACKUP_SCRIPT := $(HOMEDIR)/scripts/backup.sh +BUILD_SCRIPT := $(HOMEDIR)/scripts/build.sh +CLEAN_SCRIPT := $(HOMEDIR)/scripts/clean.sh +COPY_SCRIPT := $(HOMEDIR)/scripts/copy.sh +DOWNLOAD_SCRIPT := $(HOMEDIR)/scripts/download.sh +UNPACK_SCRIPT := $(HOMEDIR)/scripts/unpack.sh + +#------------------------------------------------------------------------------ +# Phony Targets Declaration +#------------------------------------------------------------------------------ + +.PHONY: backup build clean copy download help unpack + +#------------------------------------------------------------------------------ +# Backup Target +#------------------------------------------------------------------------------ +# @name backup +# @brief Creates a backup of existing dotfiles +# @description Saves current dotfiles to prevent accidental loss +# @command make backup +# @example make backup + +backup: ## Backup your current dotfiles + @$(BACKUP_SCRIPT) backup + +#------------------------------------------------------------------------------ +# Build Target +#------------------------------------------------------------------------------ +# @name build +# @brief Performs complete dotfiles installation +# @description Runs the full installation process including all necessary steps +# @command make build +# @example make build + +build: ## Run the full installation process + @$(BUILD_SCRIPT) build + +#------------------------------------------------------------------------------ +# Clean Target +#------------------------------------------------------------------------------ +# @name clean +# @brief Removes previous dotfiles setup +# @description Cleans up any existing dotfiles installation +# @command make clean +# @example make clean + +clean: ## Removes any previous setup + @$(CLEAN_SCRIPT) clean + +#------------------------------------------------------------------------------ +# Copy Target +#------------------------------------------------------------------------------ +# @name copy +# @brief Copies dotfiles to system +# @description Deploys dotfiles to appropriate locations +# @command make copy +# @example make copy + +copy: ## Copy the dotfiles on your system + @$(COPY_SCRIPT) copy + +#------------------------------------------------------------------------------ +# Download Target +#------------------------------------------------------------------------------ +# @name download +# @brief Downloads latest dotfiles +# @description Retrieves the most recent version of dotfiles +# @command make download +# @example make download + +download: ## Download the dotfiles on your system + @$(DOWNLOAD_SCRIPT) download + +#------------------------------------------------------------------------------ +# Unpack Target +#------------------------------------------------------------------------------ +# @name unpack +# @brief Extracts downloaded dotfiles +# @description Unpacks the dotfiles archive to the system +# @command make unpack +# @example make unpack + +unpack: ## Extract the dotfiles to your system + @$(UNPACK_SCRIPT) unpack + +#------------------------------------------------------------------------------ +# Help Target +#------------------------------------------------------------------------------ +# @name help +# @brief Displays help information +# @description Shows available commands and documentation +# @command make help +# @example make help + +help: ## Display the help menu @$(BANNER) - @awk 'BEGIN {FS = ":.*##"; printf "USAGE:\n\n make \033[1;96m[COMMAND]\033[0m\n\nCOMMANDS:\n\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[1;96m%-8s\033[0m -%s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) + @awk 'BEGIN { \ + FS = ":.*##"; \ + printf "USAGE:\n\n make \033[1;96m[COMMAND]\033[0m\n\nCOMMANDS:\n\n"; \ + } \ + /^[$$()% a-zA-Z_-]+:.*?##/ { \ + printf " \033[1;96m%-8s\033[0m -%s\n", $$1, $$2; \ + } \ + /^##@/ { \ + printf "\n\033[1m%s\033[0m\n", substr($$0, 5); \ + }' $(MAKEFILE_LIST) @echo "" @echo "DOCUMENTATION:" @echo "" @@ -54,4 +138,3 @@ help: ## Display the help menu. @echo "" @echo " This project is licensed under the MIT License." @echo "" - diff --git a/lib/aliases.sh b/lib/aliases.sh index 8a4fe879..780bbabc 100644 --- a/lib/aliases.sh +++ b/lib/aliases.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: aliases.sh # Version: 0.2.469 -# Author: @wwdseb +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell aliases # Website: https://dotfiles.io diff --git a/lib/aliases/archives/archives.aliases.sh b/lib/aliases/archives/archives.aliases.sh index 48dd3f88..56e7bfef 100644 --- a/lib/aliases/archives/archives.aliases.sh +++ b/lib/aliases/archives/archives.aliases.sh @@ -2,17 +2,12 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Archive and Compression Management # Made with β™₯ by Sebastien Rousseau # License: MIT -# This script provides functions and aliases for handling various archive formats. #----------------------------------------------------------------------------- -# Helper Functions +# Extract Function #----------------------------------------------------------------------------- -# Check if a command exists -command_exists() { - command -v "$1" >/dev/null 2>&1 -} +# Archive and Compression Management -# Extract various archive formats extract() { if [ -z "$1" ]; then echo "Usage: extract " @@ -43,7 +38,9 @@ extract() { esac } -# Compress large files with flexible format support +#----------------------------------------------------------------------------- +# Compress Function +#----------------------------------------------------------------------------- compress_large() { if [ -z "$1" ] || [ -z "$2" ]; then echo "Usage: compress_large [output_file]" @@ -71,73 +68,47 @@ compress_large() { } #----------------------------------------------------------------------------- -# Aliases for Compression Tools +# Aliases #----------------------------------------------------------------------------- -# 7-Zip -if command_exists 7z; then - alias a7z='7z a' # Create 7z archive - alias x7z='7z x' # Extract 7z archive - alias l7z='7z l' # List contents of 7z archive - alias t7z='7z t' # Test 7z archive integrity -fi - -# Tar -if command_exists tar; then - alias ctar='tar -cvf' # Create tar archive - alias xtar='tar -xvf' # Extract tar archive - alias ltar='tar -tvf' # List contents of tar archive - alias ctgz='tar -zcvf' # Create tar.gz archive - alias xtgz='tar -zxvf' # Extract tar.gz archive - alias ctbz='tar -jcvf' # Create tar.bz2 archive - alias xtbz='tar -jxvf' # Extract tar.bz2 archive - alias ctxz='tar -Jcvf' # Create tar.xz archive - alias xtxz='tar -Jxvf' # Extract tar.xz archive - alias ctzst='tar --zstd -cvf' # Create tar.zst archive - alias xtzst='tar --zstd -xvf' # Extract tar.zst archive -fi - -# Zip -if command_exists zip; then - alias czip='zip -r' # Create zip archive - alias xzip='unzip' # Extract zip archive - alias lzip='unzip -l' # List contents of zip archive -fi - -# Compression Tools -if command_exists gzip; then - alias cgz='gzip -cv' # Compress with gzip - alias xgz='gzip -dv' # Extract gzip -fi - -if command_exists bzip2; then - alias cbz='bzip2 -zk' # Compress with bzip2 - alias xbz='bzip2 -dk' # Extract bzip2 -fi - -if command_exists xz; then - alias cxz='xz -z' # Compress with xz - alias xxz='xz -d' # Extract xz -fi - -if command_exists zstd; then - alias czst='zstd -z' # Compress with zstd - alias xzst='zstd -d' # Extract zstd -fi - -if command_exists lz4; then - alias clz4='lz4 -zc' # Compress with lz4 - alias xlz4='lz4 -dc' # Extract lz4 -fi - -#----------------------------------------------------------------------------- -# Tab Completion for Extract -#----------------------------------------------------------------------------- -_extract_completion() { - local cur=${COMP_WORDS[COMP_CWORD]} - COMPREPLY=($(compgen -f -X '!*.*(tar.bz2|tbz2|tar.gz|tgz|tar.xz|tar.zst|tar|bz2|gz|rar|zip|Z|7z|zst|xz|lz4)' -- "$cur")) -} -complete -F _extract_completion extract +# 7-Zip Aliases +alias a7z='7z a' # Create 7z archive +alias x7z='7z x' # Extract 7z archive + +# Tar Aliases +alias ctar='tar -cvf' # Create tar archive +alias xtar='tar -xvf' # Extract tar archive +alias ltar='tar -tvf' # List tar archive contents +alias ctgz='tar -zcvf' # Create tar.gz archive +alias xtgz='tar -zxvf' # Extract tar.gz archive +alias ctbz='tar -jcvf' # Create tar.bz2 archive +alias xtbz='tar -jxvf' # Extract tar.bz2 archive +alias ctxz='tar -Jcvf' # Create tar.xz archive +alias xtxz='tar -Jxvf' # Extract tar.xz archive +alias ctzst='tar --zstd -cvf' # Create tar.zst archive +alias xtzst='tar --zstd -xvf' # Extract tar.zst archive + +# Zip Aliases +alias czip='zip -r' # Create zip archive +alias xzip='unzip' # Extract zip archive +alias lzip='unzip -l' # List zip archive contents + +# Gzip Aliases +alias cgz='gzip -cv' # Compress with gzip +alias xgz='gzip -dv' # Extract gzip + +# Bzip2 Aliases +alias cbz='bzip2 -zk' # Compress with bzip2 +alias xbz='bzip2 -dk' # Extract bzip2 + +# XZ Aliases +alias cxz='xz -z' # Compress with xz +alias xxz='xz -d' # Extract xz + +# Zstd Aliases +alias czst='zstd -z' # Compress with zstd +alias xzst='zstd -d' # Extract zstd + +# LZ4 Aliases +alias clz4='lz4 -zc' # Compress with lz4 +alias xlz4='lz4 -dc' # Extract lz4 -# Export functions for subshells -export -f extract -export -f compress_large diff --git a/lib/aliases/cd/cd.aliases.sh b/lib/aliases/cd/cd.aliases.sh index 8fc5dfed..8f91583a 100644 --- a/lib/aliases/cd/cd.aliases.sh +++ b/lib/aliases/cd/cd.aliases.sh @@ -3,37 +3,9 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Change directory aliases # Made with β™₯ by Sebastien Rousseau # License: MIT -# This script provides functions and aliases to quickly change directories. +# This script provides aliases to quickly change directories. ################################################################################ -#----------------------------------------------------------------------------- -# Helper Functions -#----------------------------------------------------------------------------- -# Function to change directory with optional listing -change_directory() { - local path="$1" - local list_contents="${2:-false}" - - if [[ -d "${path}" ]]; then - cd "${path}" || { echo "Failed to change to directory: ${path}"; return 1; } - echo "Changed directory to: ${path}" - if [[ "${list_contents}" == "true" ]]; then - ls -lh --group-directories-first - fi - else - echo "Error: Directory '${path}' does not exist." - return 1 - fi -} - -# Add tab completion for custom aliases -_cd_alias_completion() { - local cur=${COMP_WORDS[COMP_CWORD]} - local dirs=("app" "cod" "des" "doc" "dot" "dow" "mus" "pic" "vid" "etc" "var" "tmp") - COMPREPLY=($(compgen -W "${dirs[*]}" -- "$cur")) -} -complete -F _cd_alias_completion app cod des doc dot dow mus pic vid etc var tmp - #----------------------------------------------------------------------------- # Frequently Used Directory Variables #----------------------------------------------------------------------------- @@ -60,34 +32,20 @@ alias .....='cd ../../../..' # Go up four levels #----------------------------------------------------------------------------- # Home and Frequently Used Directories #----------------------------------------------------------------------------- -alias app='change_directory "${APP_DIR}" true' # Applications -alias cod='change_directory "${CODE_DIR}" true' # Code -alias des='change_directory "${DESK_DIR}" true' # Desktop -alias doc='change_directory "${DOCS_DIR}" true' # Documents -alias dot='change_directory "${DOTF_DIR}" true' # Dotfiles -alias dow='change_directory "${DOWN_DIR}" true' # Downloads -alias hom='change_directory "${HOME_DIR}" true' # Home Directory -alias mus='change_directory "${MUSIC_DIR}" true' # Music -alias pic='change_directory "${PICS_DIR}" true' # Pictures -alias vid='change_directory "${VIDS_DIR}" true' # Videos +alias app="cd ${APP_DIR} && ls -lh --group-directories-first" # Applications +alias cod="cd ${CODE_DIR} && ls -lh --group-directories-first" # Code +alias des="cd ${DESK_DIR} && ls -lh --group-directories-first" # Desktop +alias doc="cd ${DOCS_DIR} && ls -lh --group-directories-first" # Documents +alias dot="cd ${DOTF_DIR} && ls -lh --group-directories-first" # Dotfiles +alias dow="cd ${DOWN_DIR} && ls -lh --group-directories-first" # Downloads +alias hom="cd ${HOME_DIR} && ls -lh --group-directories-first" # Home Directory +alias mus="cd ${MUSIC_DIR} && ls -lh --group-directories-first" # Music +alias pic="cd ${PICS_DIR} && ls -lh --group-directories-first" # Pictures +alias vid="cd ${VIDS_DIR} && ls -lh --group-directories-first" # Videos #----------------------------------------------------------------------------- # System Directories #----------------------------------------------------------------------------- -if [[ -d "/etc" ]]; then - alias etc='change_directory "/etc" true' # System configuration directory -fi - -if [[ -d "/var" ]]; then - alias var='change_directory "/var" true' # System variable data directory -fi - -if [[ -d "/tmp" ]]; then - alias tmp='change_directory "/tmp" true' # Temporary files directory -fi - -#----------------------------------------------------------------------------- -# Dynamic Features -#----------------------------------------------------------------------------- -# Export the function for use in subshells -export -f change_directory +[[ -d "/etc" ]] && alias etc="cd /etc && ls -lh --group-directories-first" # System configuration +[[ -d "/var" ]] && alias var="cd /var && ls -lh --group-directories-first" # Variable data +[[ -d "/tmp" ]] && alias tmp="cd /tmp && ls -lh --group-directories-first" # Temporary files diff --git a/lib/aliases/clear/clear.aliases.sh b/lib/aliases/clear/clear.aliases.sh index 3ee8969b..7b89000d 100644 --- a/lib/aliases/clear/clear.aliases.sh +++ b/lib/aliases/clear/clear.aliases.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: clear.aliases.sh # Version: 0.2.469 -# Author: @wwdseb +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # Description: Enhances terminal interaction with aliases for clearing the screen, # navigating directories, and displaying directory contents in an organized manner. diff --git a/lib/aliases/configuration/configuration.aliases.sh b/lib/aliases/configuration/configuration.aliases.sh index 1a93a3b7..c7bd93dd 100644 --- a/lib/aliases/configuration/configuration.aliases.sh +++ b/lib/aliases/configuration/configuration.aliases.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: configuration.aliases.sh # Version: 0.2.469 -# Author: @wwdseb +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # Description: Script containing aliases to open configuration files in default # editor diff --git a/lib/aliases/default/default.aliases.sh b/lib/aliases/default/default.aliases.sh index 51649e8c..320429ee 100644 --- a/lib/aliases/default/default.aliases.sh +++ b/lib/aliases/default/default.aliases.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: default.aliases.sh # Version: 0.2.469 -# Author: @wwdseb +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # Description: Script containing default shell aliases # Website: https://dotfiles.io diff --git a/lib/aliases/list/README.md b/lib/aliases/list/README.md index 276d7705..0f73e3b6 100644 --- a/lib/aliases/list/README.md +++ b/lib/aliases/list/README.md @@ -15,28 +15,117 @@ Simply designed to fit your shell life 🐚 ![Dotfiles banner][banner] +--- + ## πŸ…»πŸ…ΈπŸ†‚πŸ†ƒ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ -This code provides a set of aliases for listing files. - -- `l` List files with size, show type, human readable. -- `l1` Display one file per line. -- `la` List all files, show type, human readable. -- `labc` List all files in alphabetical order. -- `ldir` List directories only. -- `ldot` List hidden files. -- `left` List files by date, most recent last. -- `lf` List files only. -- `lk` Sort by size, largest first. -- `lla` List full path of all files in current directory. -- `locale` List all available locales. -- `lp` List all open ports. -- `lr` Recursive list, show type, human readable. -- `ls` Colorize the output. -- `lS` Order files by size, largest first. -- `lt` List contents of directories in a tree-like format. -- `lx` Sort by extension. -- `lz` Sort by size, smallest first. -- `right` List files by date, most recent first. +This script defines a set of aliases for enhanced file listing using `eza`, or +falls back to `ls` if `eza` is not installed. These aliases provide intuitive +shortcuts for various listing styles and sorting options. + +### **Aliases Overview** + +- **`ls`** + Replaces the standard `ls` command with `eza`. If `eza` is not available, + falls back to the standard `ls`. + +- **`l`** + Mirrors the behavior of `ls` or `eza`, ensuring consistent usage. + +- **`ll`** + Lists files in a long format, including hidden files (`--long -a`). + +- **`llm`** + Lists files in long format, including hidden files, sorted by modification + date (`--long -a --sort=modified`). + +- **`la`** + Lists all files, including hidden ones, with directories listed + first (`-a --group-directories-first`). + +- **`lx`** + Lists all files and displays extended attributes, with directories listed + first (`-a --group-directories-first --extended`). + +- **`tree`** + Displays a directory tree using `eza --tree`. If `eza` is unavailable, + falls back to the `tree` command or `ls -R`. + +- **`lS`** + Lists files one entry per line (`--oneline`). + +--- + +### **Installation** + +1. Clone this repository: + + ```bash + git clone https://github.com/sebastienrousseau/dotfiles.git + ``` + +2. Source the `list.sh` script in your shell configuration: + + ```bash + echo 'source /path/to/dotfiles/list.sh' >> ~/.bashrc + source ~/.bashrc + ``` + +--- + +### **Usage Examples** + +Here are examples of how you can use the aliases: + +- **Basic Listing**: + + ```bash + ls # Basic file listing (uses eza if available) + l # Same as ls + ``` + +- **Detailed Listing**: + + ```bash + ll # Long format with hidden files + llm # Long format, sorted by modification date + ``` + +- **Specialized Listings**: + + ```bash + la # Show all files, directories first + lx # Show extended attributes, directories first + lS # One entry per line + ``` + +- **Tree View**: + + ```bash + tree # Show directory structure as a tree + ``` + +--- + +### **Fallback Behavior** + +If `eza` is not installed, the script automatically falls back to +standard `ls` with equivalent options where possible. For example: + +- **`ls` and `l`**: Use standard `ls` if `eza` is unavailable. +- **`tree`**: Falls back to `tree` if installed, or `ls -R` otherwise. + +--- + +### **Customization** + +You can adjust the aliases or add additional ones in the `list.sh` script. +For example, modify the default `tree` depth by editing: + +```bash +alias tree='eza --tree --level=2' +``` + +--- [banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg diff --git a/lib/aliases/list/list.aliases.sh b/lib/aliases/list/list.aliases.sh index 97dddc27..682518f1 100644 --- a/lib/aliases/list/list.aliases.sh +++ b/lib/aliases/list/list.aliases.sh @@ -1,86 +1,132 @@ #!/usr/bin/env bash - -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# Script: list.sh +# Version: 0.2.469 +# Author: Sebastien Rousseau (@wwdseb) # License: MIT - -# πŸ…»πŸ…ΈπŸ†‚πŸ†ƒ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - -# List hidden files. -alias 'l.'='ls -dlhF .* | grep -v "^d"' - -# Size, show type, human readable. -alias l='ls -lFh' - -# Display one file per line. -alias l1='ls -1' - -# All files, show type, human readable. -alias la='ls -lAFh' - -# List all files in alphabetical order. -alias labc='ls -lap' - -# Count the number of lines in the file. -alias lc='wc -l' - -# List files by time, newest first. -alias lct='ls -lcrh' - -# Sort by date, oldest first. -alias ld='ls -ltrh' - -# List directories only. -alias ldir="ls -l | egrep '^d'" - -# List hidden files. -alias ldot="l." - -# List files by date, most recent last. -alias left='ls -t -1' - -# List files by date, most recent first. -alias right='ls -t -1r' - -# List files only. -alias lf="ls -l | egrep -v '^d'" - -# Sort by size, largest first. -alias lk='ls -lSrh' - -# Long list, show almost all, show type, human readable. -alias ll='la' - -# List full path of all files in current directory. -alias lla='ls -l -d $PWD/*' - -# locale: List all available locales. -alias locale='locale -a | grep UTF-8' - -# List all open ports. -alias lp='sudo lsof -i -T -n' - -# Recursive list, show type, human readable. -alias lr='ls -lRh' - -# Colorize the output. -alias ls='ls --color' - -# Order Files Based on Last Modified Time and size. -alias lS='ls -1FSsh' - -# List contents of directories in a tree-like format. -alias lt="tree" - -# Sort by date, oldest first. -alias lu='ls -lurh' - -# Wide list, show almost all, show type, human readable. -alias lw='ls -xAh' - -# Sort by extension. -alias lx='ls | sort -k 1,1 -t .' - -# Sort by size, smallest first. -alias lz='ls -lSr' +# +# Description: +# This script sets a set of aliases for file listing using `eza`. +# If `eza` is not found, it falls back to `ls` with approximate equivalents. +# +# Requested Aliases: +# alias ls='eza' # Basic replacement for ls +# alias l='eza' # 'l' should be the same as ls/eza +# alias ll='eza --long -a' # Long format, including hidden files +# alias llm='eza --long -a --sort=modified'# Long format, hidden files, sorted by mod date +# alias la='eza -a --group-directories-first' # Show all files, dirs first +# alias lx='eza -a --group-directories-first --extended' # All files, dirs first, extended attrs +# alias tree='eza --tree' # Tree view +# alias lS='eza --oneline' # One entry per line +# +# Additionally, 'l' is now identical to 'ls' rather than a custom format. +################################################################################ + +if command -v eza >/dev/null 2>&1; then + # eza is available + + # @name ls + # @brief Basic replacement for ls using eza + # @description If eza is installed, ls calls eza. + # @example ls + alias ls='eza' + + # @name l + # @brief Identical to ls/eza + # @description l should mirror ls exactly when eza is available. + # @example l + alias l='eza' + + # @name ll + # @brief Long format including hidden files + # @description Uses `--long -a` for details and hidden files. + # @example ll + alias ll='eza --long -a' + + # @name llm + # @brief Long format, including hidden files, sorted by modification date + # @description Uses `--long -a --sort=modified`. + # @example llm + alias llm='eza --long -a --sort=modified' + + # @name la + # @brief Show all files, directories listed first + # @description Uses `-a --group-directories-first` to show hidden and group dirs first. + # @example la + alias la='eza -a --group-directories-first' + + # @name lx + # @brief Show all files and extended attributes, directories first + # @description `-a --group-directories-first --extended`. + # @example lx + alias lx='eza -a --group-directories-first --extended' + + # @name tree + # @brief Tree view + # @description Uses `--tree` for a tree-like directory listing. + # @example tree + alias tree='eza --tree' + + # @name lS + # @brief One entry per line + # @description Uses `--oneline` to list files one per line. + # @example lS + alias lS='eza --oneline' + +else + # eza not found, fallback to ls approximations + echo "Note: 'eza' not found. Using 'ls' fallback." >&2 + echo "Install 'eza' for enhanced listing: https://github.com/eza-community/eza" >&2 + + # @name ls (fallback) + # @brief Basic listing using ls + # @example ls + alias ls='ls' + + # @name l (fallback) + # @brief Identical to ls + # @description l should mirror ls exactly when eza is not available. + # @example l + alias l='ls' + + # @name ll (fallback) + # @brief Long format including hidden files + # @description `-lA` shows long listing including hidden files. + # @example ll + alias ll='ls -lA' + + # @name llm (fallback) + # @brief Sort by modification time + # @description `ls -ltA` sorts by modification time, includes hidden with `-A`. + # @example llm + alias llm='ls -ltA' + + # @name la (fallback) + # @brief Show all files + # @description `-a` shows hidden files. No directories-first in plain ls. + # @example la + alias la='ls -a' + + # @name lx (fallback) + # @brief Show all files; extended attributes are not directly in ls + # @description `-la` shows long listing including hidden. + # @example lx + alias lx='ls -la' + + # @name tree (fallback) + # @brief Tree view (approx.) + # @description If `tree` is installed, use it; otherwise `ls -R`. + # @example tree + if command -v tree >/dev/null 2>&1; then + alias tree='tree' + else + alias tree='ls -R' + fi + + # @name lS (fallback) + # @brief One entry per line + # @description `-1` lists files one per line. + # @example lS + alias lS='ls -1' +fi diff --git a/lib/configurations.sh b/lib/configurations.sh index 94138240..e611af92 100644 --- a/lib/configurations.sh +++ b/lib/configurations.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: configurations.sh # Version: 0.2.469 -# Author: @wwdseb +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell configurations # Website: https://dotfiles.io diff --git a/lib/configurations/bash/bashrc b/lib/configurations/bash/bashrc index 04949740..b3112a2f 100644 --- a/lib/configurations/bash/bashrc +++ b/lib/configurations/bash/bashrc @@ -1,39 +1,167 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# Script: environment.sh +# Version: 0.2.469 +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved +# Description: Configure system environment variables and load dotfiles +# Website: https://dotfiles.io # License: MIT +################################################################################ -## πŸ†…πŸ…°πŸ†πŸ…ΈπŸ…°πŸ…±πŸ…»πŸ…΄πŸ†‚ - Set Dotfiles variable. -HOSTNAME=$(hostname -f) # hostname of the machine. -INPUTRC=${HOME}/.inputrc # set INPUTRC (so that .inputrc is respected) -OS_ARCH=$(uname -m) # machine hardware name. -OS_NAME=$(uname) # operating system name. -OS_VERSION=$(uname -r) # operating system version number. -SSL_CERT_FILE=${HOME}/cacert.pem # set the SSL_CERT_FILE environment variable. -USER_LANGUAGE="en_GB.UTF-8" # default language. -USER=$(whoami) # current user name. - -## πŸ…΄πŸ†‡πŸ…ΏπŸ…ΎπŸ†πŸ†ƒπŸ†‚ - Export the variables. -export ARCHFLAGS="-arch ${OS_ARCH}" # archflags for the current machine. -export DOTFILES_VERSION='0.2.469' # version of the dotfiles. -export DOTFILES="${HOME}"/.dotfiles/lib # path to the cross plaform dotfiles. -export HOSTNAME=${HOSTNAME} # hostname of the machine. -export INPUTRC=${INPUTRC} # set INPUTRC (so that .inputrc is respected) -export LANG=${USER_LANGUAGE} # default language. -export LANGUAGE=${USER_LANGUAGE} # default language. -export LC_ALL=${USER_LANGUAGE} # default language. -export LC_CTYPE=${USER_LANGUAGE} # default language. -export OS_ARCH # machine hardware name. -export OS_NAME # operating system name. -export OS_VERSION # operating system version number. -export SSL_CERT_FILE=${SSL_CERT_FILE} # set the SSL_CERT_FILE environment variable. -export TERM=xterm-256color # default terminal color. -export USER # current user name. - -## πŸ…»πŸ…ΎπŸ…°πŸ…³πŸ…΄πŸ†πŸ†‚ - Load the dotfiles. -for loaders in "${DOTFILES}"/*.sh; do - # shellcheck source=/dev/null - . "${loaders}" -done +#----------------------------------------------------------------------------- +# Function: configure_system_info +# +# Description: +# Configures system-related environment variables. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 on failure +#----------------------------------------------------------------------------- +configure_system_info() { + # System information + if ! HOSTNAME=$(hostname -f); then + echo "Warning: Could not determine hostname" >&2 + return 1 + fi + + if ! OS_ARCH=$(uname -m); then + echo "Warning: Could not determine system architecture" >&2 + return 1 + fi + + if ! OS_NAME=$(uname); then + echo "Warning: Could not determine operating system" >&2 + return 1 + fi + + if ! OS_VERSION=$(uname -r); then + echo "Warning: Could not determine system version" >&2 + return 1 + fi + + if ! USER=$(whoami); then + echo "Warning: Could not determine username" >&2 + return 1 + fi + + # Export system variables + export HOSTNAME + export OS_ARCH + export OS_NAME + export OS_VERSION + export USER + export ARCHFLAGS="-arch ${OS_ARCH}" + + return 0 +} + +#----------------------------------------------------------------------------- +# Function: configure_locale_settings +# +# Description: +# Configures locale and language settings. +# +# Arguments: +# None +# +# Returns: +# None +#----------------------------------------------------------------------------- +configure_locale_settings() { + # Default language settings + local USER_LANGUAGE="en_GB.UTF-8" + + # Export locale variables + export LANG="${USER_LANGUAGE}" + export LANGUAGE="${USER_LANGUAGE}" + export LC_ALL="${USER_LANGUAGE}" + export LC_CTYPE="${USER_LANGUAGE}" +} + +#----------------------------------------------------------------------------- +# Function: configure_dotfiles_environment +# +# Description: +# Configures dotfiles-specific environment variables. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 on failure +#----------------------------------------------------------------------------- +configure_dotfiles_environment() { + # Dotfiles configuration + export DOTFILES_VERSION='0.2.469' + export DOTFILES="${HOME}/.dotfiles/lib" + + # Check if dotfiles directory exists + if [[ ! -d "${DOTFILES}" ]]; then + echo "Warning: Dotfiles directory not found: ${DOTFILES}" >&2 + return 1 + fi + + # Additional environment settings + export INPUTRC="${HOME}/.inputrc" + export SSL_CERT_FILE="${HOME}/cacert.pem" + export TERM="xterm-256color" + + return 0 +} + +#----------------------------------------------------------------------------- +# Function: load_dotfiles +# +# Description: +# Loads all .sh files from the dotfiles directory. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 if no files found +#----------------------------------------------------------------------------- +load_dotfiles() { + local loaders_pattern="${DOTFILES}/*.sh" + local found_files=0 + + # Check if any matching files exist + for loader in ${loaders_pattern}; do + if [[ -f "${loader}" ]]; then + found_files=1 + # shellcheck source=/dev/null + if ! . "${loader}"; then + echo "Warning: Failed to load ${loader}" >&2 + fi + fi + done + + if [[ ${found_files} -eq 0 ]]; then + echo "Warning: No dotfiles found in ${DOTFILES}" >&2 + return 1 + fi + + return 0 +} + +#----------------------------------------------------------------------------- +# Main Execution +#----------------------------------------------------------------------------- + +# Configure system information +configure_system_info || echo "Warning: System information configuration failed" >&2 + +# Configure locale settings +configure_locale_settings + +# Configure dotfiles environment +configure_dotfiles_environment || echo "Warning: Dotfiles environment configuration failed" >&2 + +# Load dotfiles +load_dotfiles || echo "Warning: Dotfiles loading failed" >&2 diff --git a/lib/functions.sh b/lib/functions.sh index 71ec243e..41e4a149 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: functions.sh # Version: 0.2.469 -# Author: @wwdseb +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # Description: Script to load custom executable functions # Website: https://dotfiles.io diff --git a/lib/history.sh b/lib/history.sh index c693d79a..c3ed22f2 100644 --- a/lib/history.sh +++ b/lib/history.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: history.sh # Version: 0.2.469 -# Author: @wwdseb +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell history configuration and display # Website: https://dotfiles.io diff --git a/lib/paths.sh b/lib/paths.sh index 94138240..e611af92 100644 --- a/lib/paths.sh +++ b/lib/paths.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: configurations.sh # Version: 0.2.469 -# Author: @wwdseb +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell configurations # Website: https://dotfiles.io diff --git a/lib/paths/homebrew/homebrew.paths.sh b/lib/paths/homebrew/homebrew.paths.sh index 28dd2ab7..f16367a9 100644 --- a/lib/paths/homebrew/homebrew.paths.sh +++ b/lib/paths/homebrew/homebrew.paths.sh @@ -1,27 +1,109 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# Script: homebrew.paths.sh +# Version: 0.2.469 +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved +# Description: Configure Homebrew environment paths and options +# Website: https://dotfiles.io # License: MIT +################################################################################ -## πŸ…·πŸ…ΎπŸ…ΌπŸ…΄πŸ…±πŸ†πŸ…΄πŸ†† πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ -if [[ "${OSTYPE}" == "darwin"* ]]; then +#----------------------------------------------------------------------------- +# Function: configure_homebrew_paths +# +# Description: +# Configures Homebrew-related paths and environment variables. +# Only runs on macOS systems. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 if not on macOS or Homebrew not found +#----------------------------------------------------------------------------- +configure_homebrew_paths() { + # Check if running on macOS + if [[ "${OSTYPE}" != "darwin"* ]]; then + echo "Warning: Homebrew configuration is only for macOS systems" >&2 + return 1 + fi # Fixed: Added missing 'fi' - ### Uniquify 'PATH' entries. - # typeset -U PATH + # Check if Homebrew is installed + if ! command -v brew >/dev/null; then + echo "Warning: Homebrew is not installed" >&2 + return 1 + fi - export PATH=/opt/homebrew/bin:"${PATH}" # Homebrew binaries - export PATH=/opt/homebrew/sbin:"${PATH}" # Homebrew binaries - export PATH=/opt/homebrew/bin/bash:"${PATH}" # Add /opt/homebrew/bin/bash to the path + # Base Homebrew paths + local homebrew_prefix="/opt/homebrew" - # Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md - export HOMEBREW_NO_ANALYTICS=1 + # Verify Homebrew directories exist + if [[ ! -d "${homebrew_prefix}" ]]; then + echo "Warning: Homebrew prefix directory not found: ${homebrew_prefix}" >&2 + return 1 + fi - # Automatically update Homebrew once a day. - export HOMEBREW_AUTO_UPDATE_SECS=86400 + # Configure PATH entries + local paths=( + "${homebrew_prefix}/bin" # Homebrew binaries + "${homebrew_prefix}/sbin" # Homebrew system binaries + "${homebrew_prefix}/bin/bash" # Homebrew bash + ) - # set HOMEBREW_CASK_OPTS - HOMEBREW_CASK_OPTS="--appdir=/Applications" - export HOMEBREW_CASK_OPTS -fi + # Add paths to PATH if they exist + for path in "${paths[@]}"; do + if [[ -d "${path}" ]]; then + PATH="${path}:${PATH}" + else + echo "Warning: Homebrew path not found: ${path}" >&2 + fi + done + + export PATH + return 0 +} + +#----------------------------------------------------------------------------- +# Function: configure_homebrew_options +# +# Description: +# Configures Homebrew behavior and preferences. +# +# Arguments: +# None +# +# Returns: +# None +#----------------------------------------------------------------------------- +configure_homebrew_options() { + # Disable Homebrew analytics + # See: https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md + export HOMEBREW_NO_ANALYTICS=1 + + # Set auto-update frequency (seconds) + # Default: Update once per day (86400 seconds) + export HOMEBREW_AUTO_UPDATE_SECS=86400 + + # Configure Homebrew Cask options + export HOMEBREW_CASK_OPTS="--appdir=/Applications" + + # Additional Homebrew preferences + export HOMEBREW_NO_ENV_HINTS=1 # Disable environment hints + export HOMEBREW_BAT=1 # Use bat for JSON output + export HOMEBREW_DISPLAY_INSTALL_TIMES=1 # Show install times + export HOMEBREW_NO_INSECURE_REDIRECT=1 # Prevent insecure redirects + export HOMEBREW_NO_AUTO_UPDATE=1 # Disable auto updates +} + +#----------------------------------------------------------------------------- +# Main Execution +#----------------------------------------------------------------------------- + +# Configure Homebrew paths +configure_homebrew_paths + +# Configure Homebrew options +configure_homebrew_options diff --git a/lib/paths/java/java.paths.sh b/lib/paths/java/java.paths.sh index f45e4d28..da8c6e73 100644 --- a/lib/paths/java/java.paths.sh +++ b/lib/paths/java/java.paths.sh @@ -1,19 +1,113 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# Script: java.paths.sh +# Version: 0.2.469 +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved +# Description: Configure Java environment paths and options +# Website: https://dotfiles.io # License: MIT +################################################################################ -## πŸ…ΉπŸ…°πŸ†…πŸ…°_πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ -# Set JAVA_HOME -if [[ "${OSTYPE}" == "darwin"* ]]; then - export CPPFLAGS="-I/opt/homebrew/opt/openjdk/include" - export JAVA_HOME="/opt/homebrew/Cellar/openjdk@11/11.0.18/libexec/openjdk.jdk/Contents/Home" - export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH" -elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - JAVA_HOME="/usr/lib/jvm/java-11-openjdk-arm64/" - -fi -export JAVA_HOME -export JRE_HOME="${JAVA_HOME}"/jre +# Java version configuration +JAVA_VERSION="23.0.1" +JAVA_MAJOR_VERSION="23" + +#----------------------------------------------------------------------------- +# Function: configure_java_paths +# +# Description: +# Configures Java-related paths based on the operating system. +# Supports both macOS (Homebrew) and Linux environments. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 on failure +#----------------------------------------------------------------------------- +configure_java_paths() { + # macOS specific configuration + if [[ "${OSTYPE}" == "darwin"* ]]; then + local java_brew_path="/opt/homebrew/Cellar/openjdk/${JAVA_VERSION}/libexec/openjdk.jdk/Contents/Home" + local java_include_path="/opt/homebrew/opt/openjdk/include" + + if [[ -d "${java_brew_path}" ]]; then + export JAVA_HOME="${java_brew_path}" + export PATH="/opt/homebrew/opt/openjdk/bin:${PATH}" + + # Set C/C++ flags for JNI development + if [[ -d "${java_include_path}" ]]; then + export CPPFLAGS="-I${java_include_path}" + else + echo "Warning: Java include path not found: ${java_include_path}" >&2 + fi + else + echo "Warning: Java not found in Homebrew path: ${java_brew_path}" >&2 + return 1 + fi + + # Linux specific configuration + elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then + local java_path="/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-openjdk-arm64" + if [[ -d "${java_path}" ]]; then + export JAVA_HOME="${java_path}" + else + echo "Warning: Java not found at ${java_path}" >&2 + return 1 + fi + + else + echo "Warning: Unsupported operating system" >&2 + return 1 + fi + + # Verify Java installation + if command -v java >/dev/null; then + local installed_version + installed_version=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2) + if [[ "${installed_version}" != "${JAVA_VERSION}"* ]]; then + echo "Warning: Installed Java version (${installed_version}) differs from expected version (${JAVA_VERSION})" >&2 + fi + else + echo "Warning: Java command not found in PATH" >&2 + return 1 + fi + + return 0 +} + +#----------------------------------------------------------------------------- +# Function: configure_java_environment +# +# Description: +# Configures additional Java environment variables and options. +# +# Arguments: +# None +# +# Returns: +# None +#----------------------------------------------------------------------------- +configure_java_environment() { + # Set JRE_HOME if it exists + if [[ -d "${JAVA_HOME}/jre" ]]; then + export JRE_HOME="${JAVA_HOME}/jre" + fi + + # Additional Java environment variables + export _JAVA_OPTIONS="${_JAVA_OPTIONS:--Xms512m -Xmx2g}" + export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS:--Dfile.encoding=UTF8}" +} + +#----------------------------------------------------------------------------- +# Main Execution +#----------------------------------------------------------------------------- + +# Configure Java paths +configure_java_paths + +# Configure Java environment +configure_java_environment diff --git a/lib/paths/maven/maven.paths.sh b/lib/paths/maven/maven.paths.sh index 29aa3c0c..5a6665dc 100644 --- a/lib/paths/maven/maven.paths.sh +++ b/lib/paths/maven/maven.paths.sh @@ -1,18 +1,106 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# Script: maven.paths.sh +# Version: 0.2.469 +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved +# Description: Configure Maven environment paths and options +# Website: https://dotfiles.io # License: MIT +################################################################################ -## πŸ…ΌπŸ…°πŸ†…πŸ…΄πŸ…½ πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ -if [[ "${OSTYPE}" == "darwin"* ]]; then - export M2_HOME=/opt/homebrew/Cellar/maven/3.9.0/libexec - export PATH=${PATH}:${M2_HOME}/bin - MAVEN_HOME=/opt/homebrew/Cellar/maven/3.9.0/libexec -elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - MAVEN_HOME="/usr/share/maven/" -fi -export MAVEN_HOME -export PATH="${MAVEN_HOME}:${PATH}" -export MAVEN_OPTS="-Xms1g -Xmx1g" +# Maven version configuration +MAVEN_VERSION="3.9.9" +MAVEN_MIN_MEMORY="1g" +MAVEN_MAX_MEMORY="1g" + +#----------------------------------------------------------------------------- +# Function: configure_maven_paths +# +# Description: +# Configures Maven-related paths based on the operating system. +# Supports both macOS (Homebrew) and Linux environments. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 on failure +#----------------------------------------------------------------------------- +configure_maven_paths() { + # macOS specific configuration + if [[ "${OSTYPE}" == "darwin"* ]]; then + local maven_brew_path="/opt/homebrew/Cellar/maven/${MAVEN_VERSION}/libexec" + if [[ -d "${maven_brew_path}" ]]; then + export M2_HOME="${maven_brew_path}" + export MAVEN_HOME="${maven_brew_path}" + else + echo "Warning: Maven not found in Homebrew path: ${maven_brew_path}" >&2 + return 1 + fi + + # Linux specific configuration + elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then + local maven_path="/usr/share/maven" + if [[ -d "${maven_path}" ]]; then + export MAVEN_HOME="${maven_path}" + else + echo "Warning: Maven not found at ${maven_path}" >&2 + return 1 + fi + + else + echo "Warning: Unsupported operating system" >&2 + return 1 + fi + + # Verify maven installation + if command -v mvn >/dev/null; then + local installed_version + installed_version=$(mvn --version | grep "Apache Maven" | awk '{print $3}') + if [[ "${installed_version}" != "${MAVEN_VERSION}" ]]; then + echo "Warning: Installed Maven version (${installed_version}) differs from expected version (${MAVEN_VERSION})" >&2 + fi + else + echo "Warning: Maven command not found in PATH" >&2 + return 1 + fi + + # Configure Maven paths + export PATH="${MAVEN_HOME}/bin:${PATH}" + + return 0 +} + +#----------------------------------------------------------------------------- +# Function: configure_maven_options +# +# Description: +# Configures Maven options including memory settings and other JVM options. +# +# Arguments: +# None +# +# Returns: +# None +#----------------------------------------------------------------------------- +configure_maven_options() { + # Set Maven memory options + export MAVEN_OPTS="-Xms${MAVEN_MIN_MEMORY} -Xmx${MAVEN_MAX_MEMORY}" + + # Additional Maven environment variables + export M2_REPO="${HOME}/.m2/repository" + export MAVEN_ARGS="${MAVEN_ARGS:---fail-fast}" +} + +#----------------------------------------------------------------------------- +# Main Execution +#----------------------------------------------------------------------------- + +# Configure Maven paths +configure_maven_paths + +# Configure Maven options +configure_maven_options diff --git a/lib/paths/node/node.paths.sh b/lib/paths/node/node.paths.sh index 77073389..a5f0f6d9 100644 --- a/lib/paths/node/node.paths.sh +++ b/lib/paths/node/node.paths.sh @@ -1,15 +1,85 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# Script: node.paths.sh +# Version: 0.2.469 +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved +# Description: Configure Node.js environment paths +# Website: https://dotfiles.io # License: MIT +################################################################################ -## πŸ…½πŸ…ΎπŸ…³πŸ…΄ πŸ…ΏπŸ…°πŸ†ƒπŸ…· -if [[ "${OSTYPE}" == "darwin"* ]]; then - NODE_PATH=/opt/homebrew/Cellar/node@18/18.10.0 -elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - NODE_PATH=${HOME}/.nvm/versions/node/v18.10.0/bin/node -fi -export NODE_PATH -export PATH="${NODE_PATH}:${PATH}" +# Node.js version configuration +NODE_VERSION="23.4.0" +NODE_VERSION_NO_V="${NODE_VERSION#v}" # Remove 'v' prefix if present + +#----------------------------------------------------------------------------- +# Function: configure_node_paths +# +# Description: +# Configures Node.js-related paths based on the operating system. +# Supports both macOS (Homebrew) and Linux (NVM) environments. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 on failure +#----------------------------------------------------------------------------- +configure_node_paths() { + # macOS specific configuration + if [[ "${OSTYPE}" == "darwin"* ]]; then + local node_brew_path="/opt/homebrew/Cellar/node/${NODE_VERSION_NO_V}" + if [[ -d "${node_brew_path}" ]]; then + NODE_PATH="${node_brew_path}" + else + echo "Warning: Node.js not found in Homebrew path: ${node_brew_path}" >&2 + return 1 + fi + + # Linux specific configuration + elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then + local node_nvm_path="${HOME}/.nvm/versions/node/v${NODE_VERSION_NO_V}/bin/node" + if [[ -f "${node_nvm_path}" ]]; then + NODE_PATH="${node_nvm_path}" + else + echo "Warning: Node.js not found at ${node_nvm_path}" >&2 + return 1 + fi + + else + echo "Warning: Unsupported operating system" >&2 + return 1 + fi + + # Verify node installation + if command -v node >/dev/null; then + local installed_version + installed_version=$(node --version) + if [[ "${installed_version}" != "v${NODE_VERSION_NO_V}" ]]; then + echo "Warning: Installed Node.js version (${installed_version}) differs from expected version (v${NODE_VERSION_NO_V})" >&2 + fi + else + echo "Warning: Node.js command not found in PATH" >&2 + return 1 + fi + + # Export Node.js related variables + export NODE_PATH + export PATH="${NODE_PATH}:${PATH}" + + # Additional Node.js environment variables + export NODE_ENV="${NODE_ENV:-development}" # Set default environment + export NODE_OPTIONS="${NODE_OPTIONS:---max-old-space-size=4096}" # Set default memory limit + + return 0 +} + +#----------------------------------------------------------------------------- +# Main Execution +#----------------------------------------------------------------------------- + +# Configure Node.js paths +configure_node_paths diff --git a/lib/paths/python/python.paths.sh b/lib/paths/python/python.paths.sh index 4e060dde..f27fa37a 100644 --- a/lib/paths/python/python.paths.sh +++ b/lib/paths/python/python.paths.sh @@ -1,36 +1,144 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# Script: python.paths.sh +# Version: 0.2.469 +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved +# Description: Configure Python environment variables, paths and aliases +# Website: https://dotfiles.io # License: MIT +################################################################################ -# πŸ…ΏπŸ†ˆπŸ†ƒπŸ…·πŸ…ΎπŸ…½ πŸ…ΏπŸ…°πŸ†ƒπŸ…· -if [[ "${OSTYPE}" == "darwin"* ]]; then - if [[ -d "/Library/Frameworks/Python.framework/Versions/3.11/bin" ]]; then - export PATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:${PATH}" - export PYTHONHOME="/Library/Frameworks/Python.framework/Versions/3.11" +# Python version configuration +PYTHON_VERSION="3.13.1" +PYTHON_MAJOR="3" + +#----------------------------------------------------------------------------- +# Function: configure_python_paths +# +# Description: +# Configures Python-related paths and environment variables based on the +# operating system. Supports both macOS and Linux environments. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 on failure +# +# Usage: +# configure_python_paths +#----------------------------------------------------------------------------- +configure_python_paths() { + # macOS specific configuration + if [[ "${OSTYPE}" == "darwin"* ]]; then + local python_framework="/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}" + if [[ -d "${python_framework}/bin" ]]; then + export PATH="${python_framework}/bin:${PATH}" + export PYTHONHOME="${python_framework}" + else + echo "Warning: Python framework not found at ${python_framework}" >&2 + return 1 + fi + + # Linux specific configuration + elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then + local python_path="/usr/bin/python${PYTHON_VERSION}" + if [[ -d "${python_path}" ]]; then + export PATH="/usr/bin:${PATH}" + export PYTHONHOME="/usr" + else + echo "Warning: Python not found at ${python_path}" >&2 + return 1 + fi fi -elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - if [[ -d "/usr/bin/python3.11" ]]; then - export PATH="/usr/bin:${PATH}" - export PYTHONHOME="/usr" + + return 0 +} + +#----------------------------------------------------------------------------- +# Function: configure_python_environment +# +# Description: +# Sets up Python environment variables for optimal operation and compatibility. +# +# Arguments: +# None +# +# Returns: +# None +#----------------------------------------------------------------------------- +configure_python_environment() { + # Character encoding configuration + export PYTHONIOENCODING='UTF-8' # Encoding used for stdin/stdout/stderr + export PYTHONUTF8=1 # Enable UTF-8 mode + + # Development environment optimization + export PYTHONDONTWRITEBYTECODE=1 # Prevent creation of .pyc files + export PYTHONUNBUFFERED=1 # Force buffering of stdout/stderr + + # Custom startup configuration + if [[ -f "${HOME}/.pythonrc" ]]; then + export PYTHONSTARTUP="${HOME}/.pythonrc" + fi + + # Virtual environment support + if [[ -n "${VIRTUAL_ENV}" ]]; then + PATH="${VIRTUAL_ENV}/bin:${PATH}" fi -fi - -# Encoding[:errors] used for stdin/stdout/stderr. -export PYTHONIOENCODING='UTF-8' - -# If set to 1, enables the UTF-8 mode. -export PYTHONUTF8=1 - -# πŸ…ΏπŸ†ˆπŸ†ƒπŸ…·πŸ…ΎπŸ…½ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - Python aliases -if command -v 'python3' >/dev/null; then - alias python=python3 # Default python version - alias python3=python3.11 # Default python3 version - alias pip=pip3 # Use pip3 as default pip version - alias py=python # Shorthand for 'python' command - alias ipy=ipython # Shorthand for 'ipython' command - alias pep8=autopep8 # Use autopep8 as a tool for formatting Python code - alias pydoc='python -m pydoc' # Shorthand for 'python -m pydoc' command -fi +} + +#----------------------------------------------------------------------------- +# Function: configure_python_aliases +# +# Description: +# Sets up aliases for common Python commands and tools. +# +# Arguments: +# None +# +# Returns: +# None +#----------------------------------------------------------------------------- +configure_python_aliases() { + if command -v "python${PYTHON_MAJOR}" >/dev/null; then + # Core Python aliases + alias python="python\${PYTHON_MAJOR}" # Default python version + alias python3="python\${PYTHON_VERSION}" # Specific python3 version + alias py='python' # Short form for python + + # Package management aliases + alias pip="pip\${PYTHON_MAJOR}" # Default pip version + alias pipup='pip install --upgrade pip' # Upgrade pip + alias piplist='pip list --outdated' # List outdated packages + + # Development tool aliases + alias ipy='ipython' # Interactive Python + alias pytest='python -m pytest' # Testing + alias pyenv='python -m venv' # Virtual environment + alias pyprof='python -m cProfile' # Profiling + alias pydoc='python -m pydoc' # Documentation + alias pep8='autopep8' # Code formatting + + # Debugging aliases + alias pdb='python -m pdb' # Debug + alias pytrace='python -m trace' # Trace execution + else + echo "Warning: Python ${PYTHON_MAJOR} not found in PATH" >&2 + fi +} + +#----------------------------------------------------------------------------- +# Main Execution +#----------------------------------------------------------------------------- + +# Configure Python paths +configure_python_paths + +# Set up Python environment variables +configure_python_environment + +# Set up Python aliases +configure_python_aliases diff --git a/lib/paths/ruby/ruby.paths.sh b/lib/paths/ruby/ruby.paths.sh index fc06da57..eb6b89bc 100644 --- a/lib/paths/ruby/ruby.paths.sh +++ b/lib/paths/ruby/ruby.paths.sh @@ -1,25 +1,102 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ +# Script: ruby.paths.sh +# Version: 0.2.469 +# Author: Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved +# Description: Configure Ruby and Gem environment paths +# Website: https://dotfiles.io # License: MIT +################################################################################ -## πŸ†πŸ†„πŸ…±πŸ†ˆ πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ -if [[ "${OSTYPE}" == "darwin"* ]]; then - if [[ -d "/opt/homebrew/opt/ruby/bin" ]]; then - RUBY_HOME="/opt/homebrew/opt/ruby/bin" - fi -elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - RUBY_HOME="/usr/lib/ruby/2.7.0/" -fi -export RUBY_HOME -export PATH="${RUBY_HOME}:${PATH}" - -## πŸ…ΆπŸ…΄πŸ…Ό πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ -GEM_HOME=$(gem environment gemdir) -GEM_PATH=${GEM_HOME} -export GEM_HOME -export GEM_PATH -export PATH="${GEM_PATH}:${PATH}" -export PATH="${GEM_HOME}:${PATH}" +# Ruby version configuration +RUBY_VERSION="3.3.0" + +#----------------------------------------------------------------------------- +# Function: configure_ruby_paths +# +# Description: +# Configures Ruby-related paths based on the operating system. +# Supports both macOS (Homebrew) and Linux environments. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 on failure +#----------------------------------------------------------------------------- +configure_ruby_paths() { + # macOS specific configuration + if [[ "${OSTYPE}" == "darwin"* ]]; then + if [[ -d "/opt/homebrew/opt/ruby/bin" ]]; then + RUBY_HOME="/opt/homebrew/opt/ruby/bin" + else + echo "Warning: Ruby not found in Homebrew path" >&2 + return 1 + fi + # Linux specific configuration + elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then + local ruby_path="/usr/lib/ruby/${RUBY_VERSION}" + if [[ -d "${ruby_path}" ]]; then + RUBY_HOME="${ruby_path}" + else + echo "Warning: Ruby not found at ${ruby_path}" >&2 + return 1 + fi + else + echo "Warning: Unsupported operating system" >&2 + return 1 + fi + + export RUBY_HOME + export PATH="${RUBY_HOME}:${PATH}" + return 0 +} + +#----------------------------------------------------------------------------- +# Function: configure_gem_paths +# +# Description: +# Configures RubyGems-related paths and environment variables. +# Sets up GEM_HOME and GEM_PATH for proper gem management. +# +# Arguments: +# None +# +# Returns: +# 0 on success, 1 on failure +#----------------------------------------------------------------------------- +configure_gem_paths() { + if command -v gem >/dev/null; then + # Get the gem directory from the gem environment + GEM_HOME="$(gem environment gemdir)" + if [[ -z "${GEM_HOME}" ]]; then + echo "Warning: Failed to determine GEM_HOME" >&2 + return 1 + fi + + GEM_PATH="${GEM_HOME}" + + # Export gem-related variables + export GEM_HOME + export GEM_PATH + export PATH="${GEM_PATH}:${PATH}" + export PATH="${GEM_HOME}:${PATH}" + else + echo "Warning: gem command not found" >&2 + return 1 + fi + return 0 +} + +#----------------------------------------------------------------------------- +# Main Execution +#----------------------------------------------------------------------------- + +# Configure Ruby paths +configure_ruby_paths + +# Configure Gem paths +configure_gem_paths From 16916da99e56e9ef0d43a5d59603b1d42578f062 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Wed, 18 Dec 2024 18:57:54 +0000 Subject: [PATCH 12/17] fix(dotfiles): :art: refactor functions and various optimisations --- lib/aliases.sh | 2 +- lib/aliases/clear/clear.aliases.sh | 2 +- .../configuration/configuration.aliases.sh | 3 - lib/aliases/jekyll/README.md | 41 -- lib/aliases/jekyll/jekyll.aliases.sh | 54 --- lib/aliases/python/python.aliases.sh | 141 +++++++ lib/aliases/update/update.aliases.sh | 373 ++++++++++++++---- lib/configurations/default/prompt.sh | 25 +- lib/configurations/prompt/prompt | 106 ----- lib/configurations/prompt/prompt.sh | 81 ++++ lib/configurations/zsh/zshrc | 1 - lib/functions.sh | 7 +- lib/functions/apihealth.sh | 277 +++++++++++++ lib/functions/apilatency.sh | 157 ++++++++ lib/functions/apiload.sh | 165 ++++++++ lib/functions/backup.sh | 143 +++++++ lib/functions/cdls.sh | 58 ++- lib/functions/curlheader.sh | 76 +++- lib/functions/curlstatus.sh | 71 +++- lib/functions/curltime.sh | 70 +++- lib/functions/encode64.sh | 94 ++++- lib/functions/environment.sh | 90 +++-- lib/functions/extract.sh | 106 +++-- lib/functions/filehead.sh | 4 - lib/functions/freespace.sh | 64 ++- lib/functions/genpwd.sh | 122 ++++-- lib/functions/goto.sh | 67 +++- lib/functions/hexdump.sh | 96 +++++ lib/functions/hiddenfiles.sh | 77 ++++ lib/functions/hidehiddenfiles.sh | 14 - lib/functions/hostinfo.sh | 113 +++++- lib/functions/hstats.sh | 74 +++- lib/functions/httpdebug.sh | 114 +++++- lib/functions/kebabcase.sh | 61 +++ lib/functions/keygen.sh | 213 ++++++++-- lib/functions/last.sh | 111 +++++- lib/functions/logout.sh | 120 +++++- lib/functions/lowercase.sh | 66 +++- lib/functions/matrix.sh | 235 +++++++++-- lib/functions/ren.sh | 76 +++- lib/functions/sentencecase.sh | 63 +++ lib/functions/size.sh | 9 +- lib/functions/snakecase.sh | 61 +++ lib/functions/sysinfo.sh | 145 +++++++ lib/functions/titlecase.sh | 65 +++ lib/functions/uppercase.sh | 70 +++- lib/paths.sh | 13 +- lib/paths/ant/ant.paths.sh | 15 - lib/paths/default/custom.paths.sh | 40 ++ lib/paths/default/default.paths.sh | 36 +- lib/paths/homebrew/homebrew.paths.sh | 109 ----- lib/paths/java/java.paths.sh | 113 ------ lib/paths/maven/maven.paths.sh | 106 ----- lib/paths/node/node.paths.sh | 85 ---- lib/paths/nvm/nvm.paths.sh | 23 -- lib/paths/pnpm/pnpm.paths.sh | 15 - lib/paths/python/python.paths.sh | 144 ------- lib/paths/ruby/ruby.paths.sh | 102 ----- lib/paths/tmux/tmux.paths.sh | 12 - package.json | 2 +- 60 files changed, 3669 insertions(+), 1329 deletions(-) delete mode 100644 lib/aliases/jekyll/README.md delete mode 100644 lib/aliases/jekyll/jekyll.aliases.sh create mode 100644 lib/aliases/python/python.aliases.sh delete mode 100644 lib/configurations/prompt/prompt create mode 100644 lib/configurations/prompt/prompt.sh create mode 100644 lib/functions/apihealth.sh create mode 100644 lib/functions/apilatency.sh create mode 100644 lib/functions/apiload.sh create mode 100644 lib/functions/backup.sh delete mode 100644 lib/functions/filehead.sh create mode 100644 lib/functions/hexdump.sh create mode 100644 lib/functions/hiddenfiles.sh delete mode 100644 lib/functions/hidehiddenfiles.sh create mode 100644 lib/functions/kebabcase.sh create mode 100644 lib/functions/sentencecase.sh create mode 100644 lib/functions/snakecase.sh create mode 100644 lib/functions/sysinfo.sh create mode 100644 lib/functions/titlecase.sh delete mode 100644 lib/paths/ant/ant.paths.sh create mode 100644 lib/paths/default/custom.paths.sh delete mode 100644 lib/paths/homebrew/homebrew.paths.sh delete mode 100644 lib/paths/java/java.paths.sh delete mode 100644 lib/paths/maven/maven.paths.sh delete mode 100644 lib/paths/node/node.paths.sh delete mode 100644 lib/paths/nvm/nvm.paths.sh delete mode 100644 lib/paths/pnpm/pnpm.paths.sh delete mode 100644 lib/paths/python/python.paths.sh delete mode 100644 lib/paths/ruby/ruby.paths.sh delete mode 100644 lib/paths/tmux/tmux.paths.sh diff --git a/lib/aliases.sh b/lib/aliases.sh index 780bbabc..8a4fe879 100644 --- a/lib/aliases.sh +++ b/lib/aliases.sh @@ -4,7 +4,7 @@ # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ # Script: aliases.sh # Version: 0.2.469 -# Author: Sebastien Rousseau +# Author: @wwdseb # Copyright (c) 2015-2025. All rights reserved # Description: Script to manage shell aliases # Website: https://dotfiles.io diff --git a/lib/aliases/clear/clear.aliases.sh b/lib/aliases/clear/clear.aliases.sh index 7b89000d..43726b65 100644 --- a/lib/aliases/clear/clear.aliases.sh +++ b/lib/aliases/clear/clear.aliases.sh @@ -68,4 +68,4 @@ alias cplt='clear_pwd_tree' alias clh='clear_history' alias cl='clear_screen' alias clp='print_working_dir' -alias clt='clear_print_tree' +alias clt='clear_print_tree' \ No newline at end of file diff --git a/lib/aliases/configuration/configuration.aliases.sh b/lib/aliases/configuration/configuration.aliases.sh index c7bd93dd..8159382d 100644 --- a/lib/aliases/configuration/configuration.aliases.sh +++ b/lib/aliases/configuration/configuration.aliases.sh @@ -68,6 +68,3 @@ alias edit_zshrc='${EDITOR} $HOME/.zshrc' # Open Zsh profile in default text editor alias edit_zsh_profile='${EDITOR} $HOME/.zsh_profile' - -# Add blank lines between groups -echo -e "\n\n" diff --git a/lib/aliases/jekyll/README.md b/lib/aliases/jekyll/README.md deleted file mode 100644 index e72434c7..00000000 --- a/lib/aliases/jekyll/README.md +++ /dev/null @@ -1,41 +0,0 @@ - - -dotfiles logo - - - -# Dotfiles (v0.2.469) - -Simply designed to fit your shell life 🐚 - -![Dotfiles banner][banner] - -## πŸ…ΉπŸ…΄πŸ…ΊπŸ†ˆπŸ…»πŸ…» πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ - -This code provides a set of aliases for -[Jekyll](https://jekyllrb.com/). - -### 1. Jekyll Core aliases - -#### 1.1 Jekyll development aliases - -- `jkb` Performs a one off build your site to ./_site -- `jkc` Removes all generated files: destination folder, metadata file, - Sass and Jekyll caches -- `jkd` Does a development build of the site to '_site' and runs a local - development server -- `jkl` Does a development build of the site to '_site' and runs a local - development server -- `jko` Open local development server - -#### 1.2 Jekyll release aliases - -- `jkp` Does a production build of the site to '_site' and runs a local - development server - -[banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg diff --git a/lib/aliases/jekyll/jekyll.aliases.sh b/lib/aliases/jekyll/jekyll.aliases.sh deleted file mode 100644 index 522bb076..00000000 --- a/lib/aliases/jekyll/jekyll.aliases.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# License: MIT - -# πŸ…ΉπŸ…΄πŸ…ΊπŸ†ˆπŸ…»πŸ…» πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ -if command -v jekyll &>/dev/null; then - # Sections: - # - # 1. Jekyll Core aliases. - # 1.1 Jekyll development aliases. - # 1.2 Jekyll release aliases. - # - # Made with β™₯ in London, UK by Sebastien Rousseau - # Copyright (c) 2015-2025. All rights reserved - # Licensed under the MIT license - # - - ## ------------------------------------------------------------------ - ## 1. Jekyll Core aliases. - ## ------------------------------------------------------------------ - - ## ------------------------------------------------------------------ - ## 1.1 Jekyll development aliases. - ## ------------------------------------------------------------------ - - # jkb: Performs a one off build your site to ./_site. - alias jkb='JEKYLL_ENV=development bundle exec jekyll build' - - # jkc: Removes all generated files: destination folder, metadata file, - # Sass and Jekyll caches. - alias jkc='JEKYLL_ENV=development bundle exec jekyll clean' - - # jkd: Does a development build of the site to '_site' and runs a - # local development server. - alias jkd='JEKYLL_ENV=development bundle exec jekyll serve --watch --trace' - - # jkl: Does a development build of the site to '_site' and runs a - # local development server. - alias jkl='JEKYLL_ENV=development bundle exec jekyll serve --livereload' - - # jko: Open local development server. - alias jko="open http://localhost:4000/" - - ## ------------------------------------------------------------------ - ## 1.2 Jekyll release aliases. - ## ------------------------------------------------------------------ - - # jkp: Does a production build of the site to '_site' and runs a local - # development server. - alias jkp='JEKYLL_ENV=production bundle exec jekyll serve --watch --trace' -fi diff --git a/lib/aliases/python/python.aliases.sh b/lib/aliases/python/python.aliases.sh new file mode 100644 index 00000000..62152649 --- /dev/null +++ b/lib/aliases/python/python.aliases.sh @@ -0,0 +1,141 @@ +#!/usr/bin/env bash + +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Python Development Environment Configuration +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved +# License: MIT +# +# Description: +# Configuration file for Python development environment, including aliases, +# environment variables, and utility functions for common Python tasks. +# +################################################################################ + +# Environment Variables +export PYTHONIOENCODING='UTF-8' # Set UTF-8 encoding for Python I/O +export PYTHONUTF8=1 # Enable UTF-8 mode for Python +export PYTHONDONTWRITEBYTECODE=1 # Prevent Python from writing .pyc files +export PYTHONUNBUFFERED=1 # Force Python output to be unbuffered +export PYENV_VIRTUALENV_DISABLE_PROMPT=1 # Disable virtualenv prompt modification + +# Frameworks and Applications +# Add Python 3.12 or the Homebrew Python to PATH +if command -v /opt/homebrew/bin/python3 >/dev/null; then + export PATH="/opt/homebrew/bin:${PATH}" +elif command -v /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 >/dev/null; then + export PATH="/Library/Frameworks/Python.framework/Versions/3.12/bin:${PATH}" +fi + +if command -v 'python3' >/dev/null; then + # Python Version Management + python() { + command python3 "$@" + } + + pip() { + command pip3 "$@" + } + + # Basic Python Commands + alias py='python' # Quick Python access + alias ipy='ipython' # Interactive Python shell + alias pyv='python --version' # Show Python version + alias pydoc='python -m pydoc' # Python documentation + + # Package Management + alias pipi='pip install' # Install packages + alias pipl='pip list' # List installed packages + alias pipup='pip install --upgrade' # Upgrade packages + alias pipun='pip uninstall -y' # Uninstall packages + alias pipf='pip freeze' # Show frozen requirements + alias pipr='pip install -r' # Install from requirements + alias pipout='pip freeze > requirements.txt' # Save requirements + + # Development Tools + alias pep8='autopep8' # Code formatting + alias lint='pylint' # Code linting + alias black='python -m black' # Code formatting with black + alias mypy='python -m mypy' # Static type checking + alias ruff='python -m ruff' # Fast Python linter + + # Testing + alias pytest='python -m pytest' # Run tests + alias pytestv='pytest -v' # Verbose test output + alias pytestc='pytest --cov' # Test coverage + alias unittest='python -m unittest' # Run unittest + + # Virtual Environment Management + alias venv='python -m venv' # Create virtual environment + alias mkvenv='python -m venv ./venv' # Create venv in current directory + alias venva='source ./venv/bin/activate' # Activate venv + alias deact='deactivate' # Deactivate venv + alias rmvenv='rm -rf ./venv' # Remove venv + + # Cleanup + alias rmpyc="find . -type f -name '*.pyc' -delete" # Remove .pyc files + alias rmpyo="find . -type f -name '*.pyo' -delete" # Remove .pyo files + alias rmpyall="find . -type f -name '*.py[cod]' -delete && find . -type d -name __pycache__ -delete" # Remove all + + # Utility Functions + python_speed() { + if [ $# -eq 0 ]; then + echo "Usage: python_speed 'Python code here'" + return 1 + fi + python -m timeit -s "$1" + } + + python_profile() { + if [ $# -eq 0 ]; then + echo "Usage: python_profile script.py" + return 1 + fi + python -m cProfile "$1" + } + + python_debug() { + if [ $# -eq 0 ]; then + echo "Usage: python_debug script.py" + return 1 + fi + python -m pdb "$1" + } + + python_serve() { + local port="${1:-8000}" + python -m http.server "$port" + } + + # Project Templates + python_new_project() { + if [ $# -eq 0 ]; then + echo "Usage: python_new_project project_name" + return 1 + fi + local project_name="$1" + mkdir -p "$project_name"/{src,tests,docs} + touch "$project_name/README.md" + touch "$project_name/requirements.txt" + touch "$project_name/setup.py" + touch "$project_name/src/__init__.py" + touch "$project_name/tests/__init__.py" + echo "Created new Python project structure in ./$project_name" + } + + # Environment Information + python_info() { + echo "Python Version:" + python --version + echo -e "\nPip Version:" + pip --version + echo -e "\nVirtual Environment:" + if [ -n "$VIRTUAL_ENV" ]; then + echo "Active: $VIRTUAL_ENV" + else + echo "None active" + fi + echo -e "\nInstalled Packages:" + pip list + } +fi \ No newline at end of file diff --git a/lib/aliases/update/update.aliases.sh b/lib/aliases/update/update.aliases.sh index 5e679ac6..b99a3a8b 100644 --- a/lib/aliases/update/update.aliases.sh +++ b/lib/aliases/update/update.aliases.sh @@ -1,69 +1,310 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# License: MIT - -# πŸ†„πŸ…ΏπŸ…³πŸ…°πŸ†ƒπŸ…΄ πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚ -os_name="$(uname)" - -if [[ "${os_name}" = "Darwin" ]]; then - alias upd=" - echo \"❯ Updating \${os_name}...\"; - sudo softwareupdate -i -a; - echo '❯ Updating Homebrew...'; - brew update && brew upgrade; - echo '❯ Updating pnpm packages...'; - pnpm up; - echo '❯ Updating Rust stable toolchain...'; - rustup update stable; - echo '❯ Updating Homebrew Casks...'; - brew cu -ayi || (brew tap buo/cask-upgrade && brew cu -ayi); - echo '❯ Cleaning up Homebrew...'; - brew cleanup && brew doctor; - echo '❯ Updating Mac App Store apps...'; - mas upgrade; - echo '❯ Updating Ruby gems...'; - sudo gem update && sudo gem cleanup; - echo '❯ Updating Python packages...'; - pip install --upgrade --user pip setuptools wheel; - update_outdated_pip_packages(); - echo '❯ Updating Node.js packages...'; - npm update -g; - echo '❯ Update complete!'; - " -elif [[ "${os_name}" = "Linux" ]]; then - # Open a file or URL in the user's preferred application. - alias open="xdg-open >/dev/null 2>&1" - - # Copy to clipboard. - alias pbcopy='xsel --clipboard --input' - - # Paste from clipboard. - alias pbpaste='xsel --clipboard --output' - alias upd=" - echo \"❯ Updating \${os_name}...\"; - sudo apt update && sudo apt upgrade -y; - echo '❯ Cleaning up package cache...'; - sudo apt autoremove -y && sudo apt clean; - echo '❯ Updating pnpm packages...'; - pnpm up; - echo '❯ Updating Rust stable toolchain...'; - rustup update stable; - echo '❯ Updating Ruby gems...'; - sudo gem update && sudo gem cleanup; - echo '❯ Updating Python packages...'; - pip install --upgrade --user pip setuptools wheel; - update_outdated_pip_packages(); - echo '❯ Updating Node.js packages...'; - npm update -g; - echo '❯ Update complete!'; - " -fi - -function update_outdated_pip_packages() { - pip list --user --outdated --format=columns | - awk 'NR>2 {print $1}' | - xargs -I{} pip install -U --user "{}" || true +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform System Update Script +# +# Author: Sebastien Rousseau +# Description: +# A comprehensive cross-platform system update script for macOS, Linux, and +# Windows. It updates system software, programming tools, and cleans up resources. +# +# Usage: +# 1. Source it: source update.sh && upd +# +################################################################################ + +#-------------------------------# +# Color Variables # +#-------------------------------# +BLUE='\033[0;34m' +GREEN='\033[0;32m' +RED='\033[0;31m' +RESET='\033[0m' + +#-------------------------------# +# Utility Functions # +#-------------------------------# + +# print_step: Prints a step message +function print_step() { + local step_msg="$1" + echo + echo -e "${GREEN}❯ ${step_msg}${RESET}" +} + +# print_note: Prints a note message +function print_note() { + local note_msg="$1" + echo -e "${BLUE}${note_msg}${RESET}" +} + +# print_error: Prints an error message +function print_error() { + local error_msg="$1" + echo -e "${RED}❯ ERROR: ${error_msg}${RESET}" >&2 +} + +# detect_os: Detects the operating system +function detect_os() { + case "$(uname -s)" in + Darwin*) echo "macOS" ;; + Linux*) echo "Linux" ;; + MINGW*|MSYS*) echo "Windows" ;; + *) echo "Unknown" ;; + esac +} + +# cmd_exists: Checks if a command exists +function cmd_exists() { + command -v "$1" >/dev/null 2>&1 +} + +#-------------------------------# +# macOS Update Functions # +#-------------------------------# + +function update_mac() { + print_step "Updating macOS system software" + if sudo /usr/sbin/softwareupdate -i -a | grep -q "No updates are available" || true; then + print_note "macOS is up-to-date." + else + print_note "macOS updates installed successfully." + fi + + if cmd_exists brew; then + print_step "Updating Homebrew packages" + brew update >/dev/null + if brew upgrade | grep -q "already up-to-date" || true; then + print_note "Homebrew packages are already up-to-date." + else + print_note "Homebrew packages updated successfully." + fi + brew cleanup || print_note "Cleaning up Homebrew." + else + print_note "Homebrew not installed. Skipping package updates." + fi + + # Update App Store apps + if cmd_exists mas; then + print_step "Updating App Store apps" + if mas upgrade | grep -q "No updates available" || true; then + print_note "No App Store updates available." + else + print_note "App Store apps updated successfully." + fi + fi +} + +#-------------------------------# +# Linux Update Functions # +#-------------------------------# + +function update_linux() { + if cmd_exists apt-get; then + print_step "Updating Linux packages with apt" + sudo apt-get update + sudo apt-get upgrade -y + sudo apt-get dist-upgrade -y + sudo apt-get autoremove -y + sudo apt-get clean + elif cmd_exists dnf; then + print_step "Updating Linux packages with dnf" + sudo dnf check-update + sudo dnf upgrade -y + sudo dnf autoremove -y + sudo dnf clean all + elif cmd_exists pacman; then + print_step "Updating Linux packages with pacman" + sudo pacman -Syu --noconfirm + sudo pacman -Sc --noconfirm + elif cmd_exists zypper; then + print_step "Updating Linux packages with zypper" + sudo zypper refresh + sudo zypper update -y + sudo zypper clean + else + print_note "No supported Linux package manager found. Skipping updates." + fi + + # Flatpak updates if available + if cmd_exists flatpak; then + print_step "Updating Flatpak applications" + flatpak update -y + flatpak uninstall --unused -y + fi + + # Snap updates if available + if cmd_exists snap; then + print_step "Updating Snap packages" + sudo snap refresh + fi +} + +#-------------------------------# +# Windows Update Functions # +#-------------------------------# + +function update_windows() { + print_step "Updating Windows packages" + + if cmd_exists choco; then + print_step "Updating Chocolatey packages" + choco upgrade all -y || print_error "Chocolatey update encountered issues." + choco cleanup -y + elif cmd_exists winget; then + print_step "Updating Winget packages" + winget upgrade --all || print_error "Winget update encountered issues." + else + print_note "No supported package manager found. Skipping updates." + fi + + # Scoop updates if available + if cmd_exists scoop; then + print_step "Updating Scoop packages" + scoop update + scoop update '*' + scoop cleanup '*' + fi } + +#-------------------------------# +# Programming Environment Tools # +#-------------------------------# + +function update_programming_tools() { + # npm + if cmd_exists npm; then + print_step "Updating npm global packages" + npm_output=$(npm update -g 2>&1) + if echo "${npm_output}" | grep -q "up to date" || true; then + print_note "npm global packages are already up to date." + else + print_note "npm global packages updated successfully." + fi + fi + + # pnpm + if cmd_exists pnpm; then + print_step "Updating pnpm global packages" + pnpm_output=$(pnpm up -g 2>&1) + if echo "${pnpm_output}" | grep -q "Nothing to update" || true; then + print_note "pnpm global packages are already up to date." + else + print_note "pnpm global packages updated successfully." + fi + fi + + # Rust toolchain + if cmd_exists rustup; then + print_step "Updating Rust toolchain" + rust_output=$(rustup update stable 2>&1) + if echo "${rust_output}" | grep -q "unchanged" || true; then + print_note "Rust toolchain is already up to date." + else + print_note "Rust toolchain updated successfully." + fi + fi + + # Cargo binaries + if cmd_exists cargo; then + print_step "Updating Cargo binaries" + cargo_output=$(cargo install-update -a 2>&1) + if echo "${cargo_output}" | grep -q "All packages are up to date" || true; then + print_note "Cargo binaries are already up to date." + else + print_note "Cargo binaries updated successfully." + fi + fi + + # Ruby Gems + if cmd_exists gem; then + print_step "Updating RubyGems and installed gems" + gem update --system >/dev/null 2>&1 && print_note "RubyGems system updated successfully." + gem_output=$(gem update 2>&1) + if echo "${gem_output}" | grep -q "Nothing to update" || true; then + print_note "All Ruby gems are already up to date." + else + print_note "Ruby gems updated successfully." + fi + gem cleanup && print_note "Ruby gems cleanup completed." + fi + + # Homebrew + if cmd_exists brew; then + print_step "Updating Homebrew packages" + brew update >/dev/null + brew_output=$(brew upgrade 2>&1) + if echo "${brew_output}" | grep -q "already up-to-date" || true; then + print_note "Homebrew packages are already up to date." + else + print_note "Homebrew packages updated successfully." + fi + brew cleanup && print_note "Homebrew cleanup completed." + fi + + # Go modules + if cmd_exists go; then + print_step "Checking for Go module updates" + go_output=$(go list -u -m all 2>&1) + if echo "${go_output}" | grep -q "no updates" || true; then + print_note "All Go modules are already up to date." + else + go get -u all && print_note "Go modules updated successfully." + fi + fi + + # Deno + if cmd_exists deno; then + print_step "Updating Deno runtime" + deno_output=$(deno upgrade 2>&1) + if echo "${deno_output}" | grep -q "already up to date" || true; then + print_note "Deno is already up to date." + else + print_note "Deno updated successfully." + fi + fi + + # VS Code extensions + if cmd_exists code; then + print_step "Updating Visual Studio Code extensions" + vscode_output=$(code --list-extensions --show-versions 2>&1) + if echo "${vscode_output}" | grep -q "No updates available" || true; then + print_note "All Visual Studio Code extensions are already up to date." + else + code --update-extensions && print_note "Visual Studio Code extensions updated successfully." + fi + fi +} + + +#-------------------------------# +# Main Update Function # +#-------------------------------# + +function upd() { + local os_name + os_name="$(detect_os)" + echo -e "${GREEN}❯ Detected OS: ${os_name}${RESET}" + + # Run OS-specific updates + case "${os_name}" in + macOS) update_mac ;; + Linux) update_linux ;; + Windows) update_windows ;; + *) print_note "Unsupported operating system. Exiting..."; return 1 ;; + esac + + # Update development tools + update_programming_tools + + echo "βœ… Installation complete – you're all set." +} + +#-------------------------------# +# Script Entry Point # +#-------------------------------# + +# If the script is executed directly, inform the user about sourcing +if [ "${BASH_SOURCE[0]}" = "${0}" ]; then + echo -e "${GREEN}❯ Source this script and run 'upd' to start the update process.${RESET}" +fi \ No newline at end of file diff --git a/lib/configurations/default/prompt.sh b/lib/configurations/default/prompt.sh index dd7041d1..137cd71f 100644 --- a/lib/configurations/default/prompt.sh +++ b/lib/configurations/default/prompt.sh @@ -7,33 +7,42 @@ ## πŸ†‚πŸ…·πŸ…΄πŸ…»πŸ…» -# Non-interactive shells don't have a prompt, exit early. -[[ $- =~ i ]] || return 0 +# Exit early for non-interactive shells +if [[ $- != *i* ]]; then return; fi -# Set a simple prompt for non-256color, non-alacritty and non-kitty terminals. -if [[ ${TERM} != *-256color ]] && [[ ${TERM} != alacritty* ]] && [[ ${TERM} != *-kitty ]]; then +# Set a simple prompt for non-256color, non-Alacritty, and non-Kitty terminals +if [[ ${TERM} != *-256color* && ${TERM} != alacritty* && ${TERM} != *-kitty* ]]; then PS1='\h \w > ' - return 0 + return fi +# Bash prompt configuration if [[ -n "${BASH_VERSION}" ]]; then + # Define colors cyan='\[\033[1;96m\]' green='\[\033[1;92m\]' purple='\[\033[1;95m\]' reset='\[\033[0m\]' + # Set prompt based on OS if [[ "${OSTYPE}" == "darwin"* ]]; then - PS1=" ο£Ώ $(uname)${purple} ❭${reset} ${green} \w ${reset} ${cyan}$ ${reset}" + PS1=" ο£Ώ $(uname)${purple} ❭${reset} ${green}\w${reset} ${cyan}$ ${reset}" else - PS1=" 🐧 $(uname)${purple} ❭${reset} ${green} \w ${reset} ${cyan}$ ${reset}" + PS1=" 🐧 $(uname)${purple} ❭${reset} ${green}\w${reset} ${cyan}$ ${reset}" fi + export PS1 + +# Zsh prompt configuration elif [[ -n "${ZSH_VERSION}" ]]; then if [[ "${OSTYPE}" == "darwin"* ]]; then PROMPT=' ο£Ώ %F{magenta} ❭%f %F{green}%~%f %F{cyan}$ %f' else PROMPT=' 🐧 %F{magenta} ❭%f %F{green}%~%f %F{cyan}$ %f' fi + + # Optional right-side prompt + export RPROMPT='%F{cyan}%T%f' export PROMPT - export RPROMPT='%F{cyan}%t%f' + fi diff --git a/lib/configurations/prompt/prompt b/lib/configurations/prompt/prompt deleted file mode 100644 index c61b4865..00000000 --- a/lib/configurations/prompt/prompt +++ /dev/null @@ -1,106 +0,0 @@ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Works with Zsh on macOS and Linux -# Made with β™₯ in London, UK by Sebastien Rousseau -# License: MIT - -## PROMPT SETTINGS -setopt PROMPT_SUBST - -# Color definitions -GREY='%F{242}' -RED='%F{#FF5C57}' -YELLOW='%F{#F3F99D}' -BLUE='%F{#57C7FF}' -MAGENTA='%F{#FF6AC1}' -RESET='%f' - -# Load datetime module for EPOCHREALTIME (if available) -zmodload zsh/datetime 2>/dev/null - -# Timer variables -typeset -g cmd_timestamp=0 - -# Function: Display the current directory -current_dir() { - echo "${BLUE}%~${RESET}" -} - -# Function: Display virtual environment (if active) -virtualenv_info() { - [[ -n "$VIRTUAL_ENV" ]] && echo "${GREY}($(basename "$VIRTUAL_ENV"))${RESET} " -} - -# Function: Git status -git_status() { - # Check if we're in a Git repository - command git rev-parse --is-inside-work-tree &>/dev/null || return 0 - - # Get current branch name or commit hash - local git_branch - git_branch="$(command git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)" || return 0 - - # Check for uncommitted changes - local status_symbol="" - command git diff --quiet --ignore-submodules HEAD &>/dev/null || status_symbol="*" - - # Determine ahead/behind status - local behind=0 ahead=0 - if command git rev-list --count --left-right '@{upstream}...HEAD' &>/dev/null; then - IFS=$' \t' read -r behind ahead < <(git rev-list --count --left-right '@{upstream}...HEAD' 2>/dev/null) - fi - - local arrows="" - (( ahead > 0 )) && arrows+="⇑" - (( behind > 0 )) && arrows+="⇣" - - echo "${GREY}${git_branch}${status_symbol}${arrows}${RESET}" -} - -# Function: Prompt symbol (βœ“ if last command succeeded, βœ— if failed) -prompt_symbol() { - echo "%(?.${MAGENTA}.${RED})❯${RESET}" -} - -# Preexec: record the start time of the command -preexec() { - cmd_timestamp=$EPOCHREALTIME -} - -# Precmd: update RPROMPT with timing and current time -precmd() { - local timer_display="" - if (( cmd_timestamp > 0 )); then - local now=$EPOCHREALTIME - local elapsed=$(( now - cmd_timestamp )) - (( elapsed >= 5 )) && timer_display="${YELLOW}$(printf "%.0fs" $elapsed)${RESET} " - cmd_timestamp=0 - fi - - export RPROMPT="${timer_display}${GREY}%T${RESET}" -} - -# Set the main prompt -setopt PROMPT_CR -setopt PROMPT_SP - -# Main prompt -prompt() { - -local venv_info -venv_info="$(virtualenv_info)" -local curr_dir -curr_dir="$(current_dir)" -local git_stat -git_stat="$(git_status)" -local prompt_sym -prompt_sym="$(prompt_symbol)" - -export PROMPT="${venv_info}${curr_dir} ${git_stat} -${prompt_sym} " - -} - -# Conditionally source additional prompt configuration if it exists -if [[ -f "$HOME/.dotfiles/lib/configurations/prompt/prompt" ]]; then - source "$HOME/.dotfiles/lib/configurations/prompt/prompt" -fi diff --git a/lib/configurations/prompt/prompt.sh b/lib/configurations/prompt/prompt.sh new file mode 100644 index 00000000..b7a39c21 --- /dev/null +++ b/lib/configurations/prompt/prompt.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved +# License: MIT + +## πŸ†‚πŸ…·πŸ…΄πŸ…»πŸ…» + +# Exit early for non-interactive shells +if [[ $- != *i* ]]; then return; fi + +# Check if we're running in a full-featured terminal +if [[ ${TERM} != *-256color* && ${TERM} != alacritty* && ${TERM} != *-kitty* ]]; then + PS1='\h \w > ' + return +fi + +# Color definitions +tmux_purple='\[\033[38;5;55m\]' # Purple (#2D1681) +tmux_red='\[\033[38;5;196m\]' # Red (#EB0000) +tmux_blue='\[\033[38;5;33m\]' # Blue (#007ACC) +tmux_white='\[\033[38;5;15m\]' # White (#FFFFFF) +tmux_green='\[\033[38;5;46m\]' # Green for clean git status +tmux_yellow='\[\033[38;5;226m\]' # Yellow for dirty git status +reset='\[\033[0m\]' + +# Git status function for bash +function git_status() { + local branch dirty + if git rev-parse --git-dir > /dev/null 2>&1; then + branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD) + if [[ -n "$(git status --porcelain 2>/dev/null)" ]]; then + echo "${tmux_yellow}${branch}*${reset}" + else + echo "${tmux_green}${branch}${reset}" + fi + fi +} + +# Function to set up zsh git prompt +function setup_zsh_git() { + autoload -Uz vcs_info + precmd_vcs_info() { vcs_info } + precmd_functions+=( precmd_vcs_info ) + setopt prompt_subst + + zstyle ':vcs_info:git:*' formats '%F{46}%b%f' + zstyle ':vcs_info:git:*' actionformats '%F{226}%b%f' + zstyle ':vcs_info:git:*' check-for-changes true + zstyle ':vcs_info:git:*' stagedstr '*' + zstyle ':vcs_info:git:*' unstagedstr '*' +} + +# Bash prompt configuration +if [[ -n "${BASH_VERSION}" ]]; then + if [[ "${OSTYPE}" == "darwin"* ]]; then + PS1="${tmux_blue} macOS ${tmux_purple}❭ ${tmux_white}\w \$(git_status) ${tmux_red}\$ ${reset}" + elif [[ "${OSTYPE}" == "linux"* ]]; then + PS1="${tmux_blue} 🐧 Linux ${tmux_purple}❭ ${tmux_white}\w \$(git_status) ${tmux_red}\$ ${reset}" + elif [[ "${OSTYPE}" == "msys"* || "${OSTYPE}" == "mingw"* ]]; then + PS1="${tmux_blue} πŸͺŸ Windows ${tmux_purple}❭ ${tmux_white}\w \$(git_status) ${tmux_red}\$ ${reset}" + else + PS1="${tmux_blue} 🌐 Unknown ${tmux_purple}❭ ${tmux_white}\w \$(git_status) ${tmux_red}\$ ${reset}" + fi + export PS1 + +# Zsh prompt configuration +elif [[ -n "${ZSH_VERSION}" ]]; then + setup_zsh_git + + if [[ "${OSTYPE}" == "darwin"* ]]; then + PROMPT="%F{33} macOS %F{55}❭ %F{15}%~ \${vcs_info_msg_0_} %F{196}\$ %f" + elif [[ "${OSTYPE}" == "linux"* ]]; then + PROMPT="%F{33} 🐧 Linux %F{55}❭ %F{15}%~ \${vcs_info_msg_0_} %F{196}\$ %f" + elif [[ "${OSTYPE}" == "msys"* || "${OSTYPE}" == "mingw"* ]]; then + PROMPT="%F{33} πŸͺŸ Windows %F{55}❭ %F{15}%~ \${vcs_info_msg_0_} %F{196}\$ %f" + else + PROMPT="%F{33} 🌐 Unknown %F{55}❭ %F{15}%~ \${vcs_info_msg_0_} %F{196}\$ %f" + fi + export PROMPT +fi \ No newline at end of file diff --git a/lib/configurations/zsh/zshrc b/lib/configurations/zsh/zshrc index cb8a7500..2b95c5e3 100644 --- a/lib/configurations/zsh/zshrc +++ b/lib/configurations/zsh/zshrc @@ -29,7 +29,6 @@ export OS_NAME # operating system name. export OS_VERSION # operating system version number. export SSL_CERT_FILE=${SSL_CERT_FILE} # set the SSL_CERT_FILE environment variable. export TERM=xterm-256color # default terminal color. -# export USER # current user name. ## πŸ…»πŸ…ΎπŸ…°πŸ…³πŸ…΄πŸ†πŸ†‚ - Load the dotfiles. for loaders in "${DOTFILES}"/*.sh; do diff --git a/lib/functions.sh b/lib/functions.sh index 41e4a149..c978cfb6 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -23,9 +23,12 @@ # ShellCheck Documentation: https://github.com/koalaman/shellcheck load_custom_functions() { - for function in "${HOME}"/.dotfiles/lib/functions/[!.#]*.sh; do + for function in "${HOME}"/.dotfiles/lib/functions/*.sh; do # shellcheck source=/dev/null - source "${function}" + source "${function}" || { + echo "Failed to source ${function}" >&2 + return 1 + } done } diff --git a/lib/functions/apihealth.sh b/lib/functions/apihealth.sh new file mode 100644 index 00000000..5b1cfc48 --- /dev/null +++ b/lib/functions/apihealth.sh @@ -0,0 +1,277 @@ +#!/usr/bin/env bash +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - apihealth +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# apihealth - API Health Check Script +# +# This script checks the health/status of one or multiple APIs by sending HTTP +# requests to specified endpoints. It supports different HTTP methods, allows +# specifying expected HTTP status codes, and accepts custom HTTP headers. +# +# Usage: +# apihealth [OPTIONS] URL [URL ...] +# +# Options: +# -h, --help Show this help message and exit +# -v, --version Show script version and exit +# -m, --method METHOD Specify HTTP method (default: GET) +# -e, --expect STATUS Specify expected HTTP status code (default: 200) +# -H, --header HEADER Specify HTTP header (can be used multiple times) +# -t, --timeout SECONDS Specify request timeout in seconds (default: 10) +# +# Examples: +# apihealth https://api.example.com/health +# apihealth -m POST -e 201 https://api.example.com/create +# apihealth --method GET --expect 204 https://api.example.com/status1 https://api.example.com/status2 +# apihealth -H "Authorization: Bearer token123" -H "Content-Type: application/json" https://api.example.com/secure +# apihealth -t 5 https://api.example.com/health +# +################################################################################ + +# Constants +APIHEALTH_SCRIPT_NAME="apihealth" +APIHEALTH_VERSION="0.1" + +# Default values +DEFAULT_METHOD="GET" +DEFAULT_EXPECT_STATUS=200 +DEFAULT_TIMEOUT=10 + +# Initialize headers array +HEADERS=() + +####################################### +# Print usage information. +# Returns: +# 0 if help was shown +####################################### +print_help() { + cat << EOF +Usage: $APIHEALTH_SCRIPT_NAME [OPTIONS] URL [URL ...] + +Options: + -h, --help Show this help message and exit + -v, --version Show script version and exit + -m, --method METHOD Specify HTTP method (default: GET) + -e, --expect STATUS Specify expected HTTP status code (default: 200) + -H, --header HEADER Specify HTTP header (can be used multiple times) + -t, --timeout SECONDS Specify request timeout in seconds (default: 10) + +Examples: + $APIHEALTH_SCRIPT_NAME https://api.example.com/health + $APIHEALTH_SCRIPT_NAME -m POST -e 201 https://api.example.com/create + $APIHEALTH_SCRIPT_NAME -H "Authorization: Bearer token123" https://api.example.com/secure + $APIHEALTH_SCRIPT_NAME -t 5 https://api.example.com/health +EOF + return 0 +} + + +####################################### +# Print version information. +# Returns: +# 0 if version was shown +####################################### +print_version() { + echo "$APIHEALTH_SCRIPT_NAME version $APIHEALTH_VERSION" + return 0 +} + +####################################### +# Check if required dependencies are installed. +# Returns: +# 1 if dependencies are missing +####################################### +check_dependencies() { + if ! command -v curl >/dev/null 2>&1; then + echo -e "\e[31m[ERROR]\e[0m Required command 'curl' is not installed." + return 1 + fi + return 0 +} + +####################################### +# Check API health/status endpoints. +# Arguments: +# $1 - URL +# $2 - HTTP Method +# $3 - Expected HTTP Status Code +# $4 - Timeout in seconds +# Returns: +# 0 if health check passed, 1 if failed +####################################### +apihealthealth() { + local url="$1" + local method="${2:-$DEFAULT_METHOD}" + local expect_status="${3:-$DEFAULT_EXPECT_STATUS}" + local timeout="${4:-$DEFAULT_TIMEOUT}" + local curl_headers=() + + echo -e "[INFO] Testing API health: $url" + echo -e "[INFO] Method: $method, Expected Status: $expect_status, Timeout: ${timeout}s" + + # Build curl headers array + if [[ ${#HEADERS[@]} -gt 0 ]]; then + for header in "${HEADERS[@]}"; do + curl_headers+=(-H "$header") + done + fi + + # Perform the HTTP request + local response + if [[ ${#curl_headers[@]} -gt 0 ]]; then + response=$(curl -s -o /dev/null -w "%{http_code}" \ + -X "$method" \ + --max-time "$timeout" \ + "${curl_headers[@]}" \ + "$url" 2>/dev/null || echo "000") + else + response=$(curl -s -o /dev/null -w "%{http_code}" \ + -X "$method" \ + --max-time "$timeout" \ + "$url" 2>/dev/null || echo "000") + fi + + if [[ "$response" -eq "$expect_status" ]]; then + echo -e "\e[32m[SUCCESS]\e[0m API is healthy (Status: $response)" + return 0 + elif [[ "$response" -eq "000" ]]; then + echo -e "\e[31m[ERROR]\e[0m API health check failed (No response)" + return 1 + else + echo -e "\e[31m[ERROR]\e[0m API health check failed (Status: $response)" + return 1 + fi +} + +####################################### +# Parse command-line arguments. +# Arguments: +# Command line arguments +# Returns: +# 0 if parsing successful, 1 if failed +####################################### +parse_arguments() { + # Initialize variables + METHOD="$DEFAULT_METHOD" + EXPECT_STATUS="$DEFAULT_EXPECT_STATUS" + TIMEOUT="$DEFAULT_TIMEOUT" + URLS=() + HEADERS=() + + while [[ $# -gt 0 ]]; do + case "$1" in + -h|--help) + print_help + return 2 # Special return code for help/version display + ;; + -v|--version) + print_version + return 2 # Special return code for help/version display + ;; + -m|--method) + if [[ -n "${2:-}" && ! "$2" =~ ^- ]]; then + METHOD="$2" + shift 2 + else + echo -e "\e[31m[ERROR]\e[0m --method requires a non-empty option argument." + return 1 + fi + ;; + -e|--expect) + if [[ -n "${2:-}" && ! "$2" =~ ^- ]]; then + EXPECT_STATUS="$2" + shift 2 + else + echo -e "\e[31m[ERROR]\e[0m --expect requires a non-empty option argument." + return 1 + fi + ;; + -H|--header) + if [[ -n "${2:-}" && ! "$2" =~ ^- ]]; then + if [[ ! "$2" =~ ^[^:]+:[[:space:]]*[^[:space:]]+.*$ ]]; then + echo -e "\e[31m[ERROR]\e[0m Invalid header format: '$2'. Expected 'Key: Value'" + return 1 + fi + HEADERS+=("$2") + shift 2 + else + echo -e "\e[31m[ERROR]\e[0m --header requires a non-empty option argument." + return 1 + fi + ;; + -t|--timeout) + if [[ -n "${2:-}" && ! "$2" =~ ^- ]]; then + if ! [[ "$2" =~ ^[0-9]+$ ]]; then + echo -e "\e[31m[ERROR]\e[0m Timeout must be a positive integer." + return 1 + fi + TIMEOUT="$2" + shift 2 + else + echo -e "\e[31m[ERROR]\e[0m --timeout requires a non-empty option argument." + return 1 + fi + ;; + -*) + echo -e "\e[31m[ERROR]\e[0m Unknown option: $1" + print_help + return 1 + ;; + *) + URLS+=("$1") + shift + ;; + esac + done + + # Validate URLs provided + if [[ ${#URLS[@]} -eq 0 ]]; then + echo -e "\e[31m[ERROR]\e[0m No URLs provided." + print_help + return 1 + fi + + return 0 +} + +####################################### +# Main execution function. +# Arguments: +# Command line arguments +# Returns: +# 0 if all checks passed, 1 if any failed +####################################### +apihealth_main() { + if ! check_dependencies; then + return 1 + fi + + if ! parse_arguments "$@"; then + return 1 + fi + + local overall_status=0 + + for url in "${URLS[@]}"; do + if ! apihealthealth "$url" "$METHOD" "$EXPECT_STATUS" "$TIMEOUT"; then + overall_status=1 + fi + echo "----------------------------------------" + done + + if [[ "$overall_status" -eq 0 ]]; then + echo -e "\e[32mAll API health checks passed successfully.\e[0m" + else + echo -e "\e[31mSome API health checks failed.\e[0m" + fi + + return "$overall_status" +} + +# Define the function for sourcing +apihealth() { + apihealth_main "$@" +} \ No newline at end of file diff --git a/lib/functions/apilatency.sh b/lib/functions/apilatency.sh new file mode 100644 index 00000000..46b7aec7 --- /dev/null +++ b/lib/functions/apilatency.sh @@ -0,0 +1,157 @@ +#!/usr/bin/env bash +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - apilatency +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# apilatency - API Latency / Response Time Monitor +# +# This script monitors the response time of an API endpoint over a specified +# number of requests and interval. +# +# Usage: +# apilatency URL [COUNT] [INTERVAL] +# +# Options: +# -h, --help Show this help message and exit +# -v, --version Show script version and exit +# +# Examples: +# apilatency https://api.example.com 10 1 +# apilatency https://api.example.com 20 0.5 +# +################################################################################ + +# Constants +APILATENCY_SCRIPT_NAME="apilatency" +APILATENCY_VERSION="0.0.1" + +####################################### +# Print usage information. +####################################### +apilatency_print_help() { + cat << EOF +Usage: $APILATENCY_SCRIPT_NAME URL [COUNT] [INTERVAL] + +Arguments: + URL The API endpoint to monitor + COUNT Number of requests to perform (default: 10) + INTERVAL Delay between requests in seconds (default: 1) + +Options: + -h, --help Show this help message and exit + -v, --version Show script version and exit + +Examples: + $APILATENCY_SCRIPT_NAME https://api.example.com 10 1 + $APILATENCY_SCRIPT_NAME https://api.example.com 20 0.5 +EOF +} + +####################################### +# Print version information. +####################################### +apilatency_print_version() { + echo "$APILATENCY_SCRIPT_NAME version $APILATENCY_VERSION" +} + +####################################### +# Monitor API response time. +####################################### +apilatency_monitor() { + local url="$1" + local count="${2:-10}" + local interval="${3:-1}" + + echo -e "[INFO] Monitoring API latency for $url" + echo -e "[INFO] Total Requests: $count, Delay Between Requests: $interval seconds" + echo "Time,Response_Time" + + for ((i = 1; i <= count; i++)); do + local start=$(date +%s.%N) + curl -s -o /dev/null "$url" + local end=$(date +%s.%N) + local latency=$(echo "$end - $start" | bc) + echo "$(date '+%H:%M:%S'),$latency" + sleep "$interval" + done + + echo -e "\e[32m[SUCCESS]\e[0m Latency monitoring completed." +} + +####################################### +# Parse command-line arguments. +####################################### +apilatency_parse_arguments() { + # First argument handling + case "${1:-}" in + -h|--help) + apilatency_print_help + return 2 + ;; + -v|--version) + apilatency_print_version + return 2 + ;; + "") + echo -e "\e[31m[ERROR]\e[0m Missing required URL argument." + apilatency_print_help + return 1 + ;; + esac + + # Store arguments + local url="$1" + local count="${2:-10}" + local interval="${3:-1}" + + # Validate URL + if [[ ! "$url" =~ ^https?:// ]]; then + echo -e "\e[31m[ERROR]\e[0m Invalid URL format. Must start with http:// or https://" + return 1 + fi + + # Validate count + if ! [[ "$count" =~ ^[0-9]+$ ]]; then + echo -e "\e[31m[ERROR]\e[0m COUNT must be a positive integer." + return 1 + fi + + # Validate interval + if ! [[ "$interval" =~ ^[0-9]+(\.[0-9]+)?$ ]]; then + echo -e "\e[31m[ERROR]\e[0m INTERVAL must be a positive number." + return 1 + fi + + # Export variables for use in main function + URL="$url" + COUNT="$count" + INTERVAL="$interval" + + return 0 +} + +####################################### +# Main function. +####################################### +apilatency_main() { + apilatency_parse_arguments "$@" + local parse_result=$? + + case $parse_result in + 0) # Normal operation + apilatency_monitor "$URL" "$COUNT" "$INTERVAL" + ;; + 2) # Help or version was displayed + return 0 + ;; + *) # Error occurred + return 1 + ;; + esac +} + +# The main function that gets exported for use +apilatency() { + apilatency_main "$@" +} \ No newline at end of file diff --git a/lib/functions/apiload.sh b/lib/functions/apiload.sh new file mode 100644 index 00000000..7fad627e --- /dev/null +++ b/lib/functions/apiload.sh @@ -0,0 +1,165 @@ +#!/usr/bin/env bash +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - apiload +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# apiload - API Load Testing Script +# +# This script performs basic load testing on a specified API endpoint using +# default utilities available in macOS, Linux, or Windows environments. It allows +# you to specify the number of total requests and the delay between requests. +# +# Usage: +# apiload URL [REQUESTS] [DELAY] +# +# Examples: +# apiload https://api.example.com 100 0.1 +# apiload https://api.example.com 500 0.5 +# +################################################################################ + +# Constants +APILOAD_SCRIPT_NAME="apiload" +APILOAD_VERSION="0.0.1" + +####################################### +# Print usage information. +####################################### +apiload_print_help() { + cat << EOF +Usage: $APILOAD_SCRIPT_NAME URL [REQUESTS] [DELAY] + +Arguments: + URL The API endpoint to load test + REQUESTS Number of total requests to perform (default: 100) + DELAY Delay between requests in seconds (default: 0.1) + +Options: + -h, --help Show this help message and exit + -v, --version Show script version and exit + +Examples: + $APILOAD_SCRIPT_NAME https://api.example.com 100 0.1 + $APILOAD_SCRIPT_NAME https://api.example.com 500 0.5 +EOF +} + +####################################### +# Print version information. +####################################### +apiload_print_version() { + echo "$APILOAD_SCRIPT_NAME version $APILOAD_VERSION" +} + +####################################### +# Perform API load testing. +####################################### +apiload_load_test() { + local url="$1" + local requests="${2:-100}" + local delay="${3:-0.1}" + + echo -e "[INFO] Running load test on $url" + echo -e "[INFO] Total Requests: $requests, Delay Between Requests: $delay seconds" + + local success_count=0 + local fail_count=0 + + for ((i = 1; i <= requests; i++)); do + response=$(curl -s -o /dev/null -w "%{http_code}" "$url") + if [[ "$response" -eq 200 ]]; then + echo -e "\e[32m[Request $i]\e[0m Success (HTTP 200)" + ((success_count++)) + else + echo -e "\e[31m[Request $i]\e[0m Failed (HTTP $response)" + ((fail_count++)) + fi + sleep "$delay" + done + + echo -e "\n[SUMMARY]" + echo -e "Total Requests: $requests" + echo -e "Successful: \e[32m$success_count\e[0m" + echo -e "Failed: \e[31m$fail_count\e[0m" + echo -e "Success Rate: $(( (success_count * 100) / requests ))%" + + echo -e "\n\e[32m[SUCCESS]\e[0m Load test completed." +} + +####################################### +# Parse command-line arguments. +####################################### +apiload_parse_arguments() { + # First argument handling + case "${1:-}" in + -h|--help) + apiload_print_help + return 2 + ;; + -v|--version) + apiload_print_version + return 2 + ;; + "") + echo -e "\e[31m[ERROR]\e[0m Missing required URL argument." + apiload_print_help + return 1 + ;; + esac + + # Store arguments + local url="$1" + local requests="${2:-100}" + local delay="${3:-0.1}" + + # Validate URL + if [[ ! "$url" =~ ^https?:// ]]; then + echo -e "\e[31m[ERROR]\e[0m Invalid URL format. Must start with http:// or https://" + return 1 + fi + + # Validate requests + if ! [[ "$requests" =~ ^[0-9]+$ ]]; then + echo -e "\e[31m[ERROR]\e[0m REQUESTS must be a positive integer." + return 1 + fi + + # Validate delay + if ! [[ "$delay" =~ ^[0-9]+(\.[0-9]+)?$ ]]; then + echo -e "\e[31m[ERROR]\e[0m DELAY must be a positive number." + return 1 + fi + + # Export variables for use in main function + URL="$url" + REQUESTS="$requests" + DELAY="$delay" + + return 0 +} + +####################################### +# Main function. +####################################### +apiload_main() { + apiload_parse_arguments "$@" + local parse_result=$? + + case $parse_result in + 0) # Normal operation + apiload_load_test "$URL" "$REQUESTS" "$DELAY" + ;; + 2) # Help or version was displayed + return 0 + ;; + *) # Error occurred + return 1 + ;; + esac +} + +# The apiload_main function that gets exported for use +apiload() { + apiload_main "$@" +} \ No newline at end of file diff --git a/lib/functions/backup.sh b/lib/functions/backup.sh new file mode 100644 index 00000000..11be8603 --- /dev/null +++ b/lib/functions/backup.sh @@ -0,0 +1,143 @@ +#!/usr/bin/env bash + +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform Backup Utility (backup) +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# Description: +# backup is a utility that creates timestamped backups of files and directories. +# It can automatically compress large backups and maintains a configurable +# backup history. +# +# Usage: +# backup [--max-size SIZE] [--keep N] [ ...] +# +# Arguments: +# One or more file or directory paths to back up. +# +# Options: +# --max-size SIZE Maximum uncompressed backup size before compression. +# Uses 'M' for megabytes, 'K' for kilobytes, or no suffix +# for bytes. Default is '100M' (100 megabytes). +# +# --keep N Number of most recent backups to keep. Older backups +# are removed. Default is 5. +# +# Notes: +# - Backups are stored in a 'backups' directory in the current working directory. +# Adjust the BACKUP_DIR variable if needed. +# - The script creates a timestamped tar archive for the backup. +# - If the tar archive exceeds --max-size, it will be compressed with gzip. +################################################################################ + +backup() { + # Default configuration + BACKUP_DIR="${BACKUP_DIR:-./backups}" + MAX_SIZE="100M" # Default max size before compression + KEEP=5 # Default number of backups to keep + + # Parse arguments + while [[ "$#" -gt 0 ]]; do + case "$1" in + --max-size) + MAX_SIZE="$2" + shift 2 + ;; + --keep) + KEEP="$2" + shift 2 + ;; + -*) + echo "[ERROR] Unknown option: $1" >&2 + return 1 + ;; + *) + # Once we hit a non-option, break to treat all remaining as files/dirs + break + ;; + esac + done + + # Ensure at least one file or directory is provided + if [[ "$#" -lt 1 ]]; then + echo "[ERROR] Please provide at least one file or directory to back up." >&2 + return 1 + fi + + # Create backup directory if it doesn't exist + if [[ ! -d "$BACKUP_DIR" ]]; then + mkdir -p "$BACKUP_DIR" + fi + + # Generate a timestamp for the backup filename + TIMESTAMP=$(date +"%Y%m%d_%H%M%S") + + # Construct a temporary tar archive name (uncompressed) + TAR_NAME="backup_${TIMESTAMP}.tar" + TAR_PATH="${BACKUP_DIR}/${TAR_NAME}" + + # Create the tar archive + if tar cf "${TAR_PATH}" "$@"; then + echo "[INFO] Created backup archive '${TAR_PATH}'." + else + echo "[ERROR] Failed to create the backup archive." >&2 + return 1 + fi + + # Convert MAX_SIZE to bytes for comparison + convert_size_to_bytes() { + local size_str="$1" + local num="${size_str//[!0-9]/}" + local unit=$(echo "${size_str}" | sed 's/[0-9]//g' | tr '[:upper:]' '[:lower:]') + + case "$unit" in + m) echo $((num * 1024 * 1024)) ;; + k) echo $((num * 1024)) ;; + "") echo "${num}" ;; # No unit means bytes + *) + echo "[ERROR] Invalid unit in --max-size. Use M for megabytes, K for kilobytes, or no unit for bytes." >&2 + return 1 + ;; + esac + } + + MAX_BYTES=$(convert_size_to_bytes "$MAX_SIZE") + [[ $? -ne 0 ]] && return 1 + + # Get file size in bytes using wc -c + FILE_SIZE=$(wc -c < "${TAR_PATH}") + + if (( FILE_SIZE > MAX_BYTES )); then + # Compress the backup + if gzip "${TAR_PATH}"; then + COMPRESSED_PATH="${TAR_PATH}.gz" + echo "[INFO] Backup exceeded ${MAX_SIZE}. Compressed to '${COMPRESSED_PATH}'." + else + echo "[ERROR] Failed to compress the backup." >&2 + return 1 + fi + else + COMPRESSED_PATH="${TAR_PATH}" + echo "[INFO] No compression required." + fi + + # Enforce backup retention + BACKUPS=($(ls -1t "${BACKUP_DIR}"/backup_*.tar* 2>/dev/null)) + BACKUP_COUNT=${#BACKUPS[@]} + + # Only attempt removal if we actually have more backups than KEEP + if (( BACKUP_COUNT > KEEP )); then + REMOVE_COUNT=$((BACKUP_COUNT - KEEP)) + OLD_BACKUPS=("${BACKUPS[@]:$KEEP:$REMOVE_COUNT}") + for old_backup in "${OLD_BACKUPS[@]}"; do + if rm -f "$old_backup"; then + echo "[INFO] Removed old backup '$old_backup'." + else + echo "[ERROR] Failed to remove old backup '$old_backup'." >&2 + fi + done + fi + + echo "[INFO] Backup completed successfully. Current backups stored in '${BACKUP_DIR}'." +} diff --git a/lib/functions/cdls.sh b/lib/functions/cdls.sh index 986a5fff..a1cd6760 100644 --- a/lib/functions/cdls.sh +++ b/lib/functions/cdls.sh @@ -1,14 +1,60 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Change Directory and List Contents (cdls) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# cdls is a simple function that combines the functionality of `cd` and `ls`. +# When called, it changes the current working directory and immediately lists +# the contents of the new directory. +# +# Usage: +# cdls [directory] +# cdls --help +# +# Arguments: +# directory The directory to change to. If omitted, changes to the home +# directory (default behavior of `cd`). +# --help Displays this help menu and exits. +# +# Examples: +# cdls /tmp # Changes to the /tmp directory and lists its contents. +# cdls # Changes to the home directory and lists its contents. +# cdls --help # Displays the help menu. +# +################################################################################ -# Function to combine cd and ls. -# cdls: Function to combine cd and ls. +# Function to combine cd and ls cdls() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "cdls: Change Directory and List Contents" + echo + echo "Usage:" + echo " cdls [directory]" + echo " cdls --help" + echo + echo "Aliases:" + echo " alias cdl='cdls' # Alias for cdls to simplify usage" + echo + echo "Arguments:" + echo " directory The directory to change to. If omitted, changes to the home" + echo " directory (default behavior of \`cd\`)." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " cdls /tmp # Changes to the /tmp directory and lists its contents." + echo " cdls # Changes to the home directory and lists its contents." + echo " cdls --help # Displays the help menu." + echo + return 0 + fi + + # Change to the specified directory and list its contents cd "$@" && ls } -alias cdl='cdls' # alias for cdls +# Alias for convenience +alias cdl='cdls' # Alias for cdls to simplify usage diff --git a/lib/functions/curlheader.sh b/lib/functions/curlheader.sh index f774807f..e0ed5cbb 100644 --- a/lib/functions/curlheader.sh +++ b/lib/functions/curlheader.sh @@ -1,22 +1,78 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Curl Header Viewer (curlheader) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# curlheader is a function to fetch and display HTTP headers for a given URL. +# It can either display all headers or filter for a specific header by name. +# +# Usage: +# curlheader [header] [url] +# curlheader --help +# +# Arguments: +# header The specific HTTP header to filter and display (optional). +# url The URL for which to fetch headers. +# --help Displays this help menu and exits. +# +# Examples: +# curlheader https://example.com +# # Fetch and display all headers for the given URL. +# +# curlheader Content-Type https://example.com +# # Fetch and display only the Content-Type header for the given URL. +# +# curlheader --help +# # Displays the help menu. +# +################################################################################ -## curlheader: Function to return only a specific response header or all response headers for a given URL. -## usage: curlheader $header $url -## usage: curlheader $url +# Function to fetch and display HTTP headers curlheader() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "curlheader: Curl Header Viewer" + echo + echo "Usage:" + echo " curlheader [header] [url]" + echo " curlheader --help" + echo + echo "Arguments:" + echo " header The specific HTTP header to filter and display (optional)." + echo " url The URL for which to fetch headers." + echo " --help Displays this help menu and exits." + echo + echo "Aliases:" + echo " alias chd='curlheader' # Alias for curlheader" + echo " alias chdr='curlheader' # Alias for curlheader" + echo + echo "Examples:" + echo " curlheader https://example.com" + echo " # Fetch and display all headers for the given URL." + echo + echo " curlheader Content-Type https://example.com" + echo " # Fetch and display only the Content-Type header for the given URL." + echo + echo " curlheader --help" + echo " # Displays the help menu." + echo + return 0 + fi + + # Check if only a URL is provided if [[ -z "$2" ]]; then - echo "curl -k -s -D - $1 -o /dev/null" - curl -k -s -D - "$1" -o /dev/null: + echo "Fetching all headers for URL: $1" + curl -k -s -D - "$1" -o /dev/null else - echo "curl -k -s -D - $2 -o /dev/null | grep $1:" - curl -k -s -D - "$2" -o /dev/null || grep "$1": + # Fetch and filter for a specific header + echo "Fetching '$1' header for URL: $2" + curl -k -s -D - "$2" -o /dev/null | grep -i "$1:" fi } +# Aliases for convenience alias chd='curlheader' # Alias for curlheader alias chdr='curlheader' # Alias for curlheader diff --git a/lib/functions/curlstatus.sh b/lib/functions/curlstatus.sh index 238dfeeb..4edb1436 100644 --- a/lib/functions/curlstatus.sh +++ b/lib/functions/curlstatus.sh @@ -1,17 +1,74 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Curl HTTP Status Code Viewer (curlstatus) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# curlstatus is a function to fetch and display the HTTP status code for a +# given URL. It uses curl to make a request and extracts the HTTP status +# code. +# +# Usage: +# curlstatus [url] +# curlstatus --help +# +# Arguments: +# url The URL for which to fetch the HTTP status code. +# --help Displays this help menu and exits. +# +# Examples: +# curlstatus https://example.com +# # Fetch and display the HTTP status code for the given URL. +# +# curlstatus --help +# # Displays the help menu. +# +################################################################################ -## curlstatus: Function to return only the HTTP status code for a given URL. -## usage: curlstatus $url +# Function to fetch and display HTTP status code curlstatus() { - # shellcheck disable=SC1083 - echo "curl -k -s -o /dev/null -w \"%{http_code}\" \$1:" + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "curlstatus: Curl HTTP Status Code Viewer" + echo + echo "Usage:" + echo " curlstatus [url]" + echo " curlstatus --help" + echo + echo "Aliases:" + echo " alias cs='curlstatus' # Alias for curlstatus" + echo " alias cst='curlstatus' # Alias for curlstatus" + echo " alias httpcode='curlstatus' # Alias for curlstatus" + echo + echo "Arguments:" + echo " url The URL for which to fetch the HTTP status code." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " curlstatus https://example.com" + echo " # Fetch and display the HTTP status code for the given URL." + echo + echo " curlstatus --help" + echo " # Displays the help menu." + echo + return 0 + fi + + # Check if a URL is provided + if [[ -z "$1" ]]; then + echo "[ERROR] No URL provided. Use 'curlstatus --help' for usage information." >&2 + return 1 + fi + + # Fetch and display the HTTP status code + echo "Fetching HTTP status code for URL: $1" curl -k -s -o /dev/null -w "%{http_code}" "$1" + echo } + +# Aliases for convenience alias cs='curlstatus' # Alias for curlstatus alias cst='curlstatus' # Alias for curlstatus alias httpcode='curlstatus' # Alias for curlstatus diff --git a/lib/functions/curltime.sh b/lib/functions/curltime.sh index 24234628..6caabf02 100644 --- a/lib/functions/curltime.sh +++ b/lib/functions/curltime.sh @@ -1,23 +1,63 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Curl Timing Viewer (curltime) +# Made with β™₯ by Sebastien Rousseau # License: MIT - -# https://dotfiles.io # -# Description: Mac OS X Dotfiles - Simply designed to fit your shell life. +# Description: +# curltime is a function that measures and displays various timing metrics for +# an HTTP request made to a given URL using `curl`. It provides detailed +# information on DNS resolution time, connection time, and total transfer time. +# +# Usage: +# curltime [url] +# curltime --help +# +# Arguments: +# url The URL for which to fetch timing metrics. +# --help Displays this help menu and exits. +# +# Examples: +# curltime https://example.com +# # Displays the timing metrics for the given URL. # -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# Licensed under the MIT license +# curltime --help +# # Displays the help menu. # +################################################################################ -# Curl Time: Function to return the time it took to get a response from a given URL. -## get the timings for a curl to a URL -## usage: curltime $url +# Function to display timing metrics for a given URL curltime() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "curltime: Curl Timing Viewer" + echo + echo "Usage:" + echo " curltime [url]" + echo " curltime --help" + echo + echo "Arguments:" + echo " url The URL for which to fetch timing metrics." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " curltime https://example.com" + echo " # Displays the timing metrics for the given URL." + echo + echo " curltime --help" + echo " # Displays the help menu." + echo + return 0 + fi + + # Check if a URL is provided + if [[ -z "$1" ]]; then + echo "[ERROR] No URL provided. Use 'curltime --help' for usage information." >&2 + return 1 + fi + + # Fetch and display timing metrics for the URL curl -w "\n\ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”\n\ β”‚Time appconnect: %{time_appconnect}s β”‚\n\ @@ -29,5 +69,7 @@ curltime() { β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜\n\ Time total: %{time_total}s\n\n" -o /dev/null -s "$1" } -alias cht="curltime" # cht: Curl Time. -alias chtm="curltime" # chtm: Curl Time. + +# Aliases for convenience +alias cht="curltime" # Alias for curltime +alias chtm="curltime" # Alias for curltime diff --git a/lib/functions/encode64.sh b/lib/functions/encode64.sh index 8ea31c54..70e60a5c 100644 --- a/lib/functions/encode64.sh +++ b/lib/functions/encode64.sh @@ -1,27 +1,107 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Base64 Encode and Decode (encode64/decode64) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# encode64 and decode64 are functions for encoding and decoding strings to and +# from base64. These functions can process input either directly as arguments +# or via standard input (pipe). +# +# Usage: +# encode64 [string] +# encode64 --help +# +# decode64 [base64_string] +# decode64 --help +# +# Arguments: +# string The string to encode into base64 (optional). +# base64_string The base64-encoded string to decode (optional). +# --help Displays the help menu and exits. +# +# Examples: +# echo "Hello World" | encode64 +# # Encodes "Hello World" to base64 via pipe. +# +# encode64 "Hello World" +# # Encodes "Hello World" to base64 directly from arguments. +# +# decode64 "SGVsbG8gV29ybGQK" +# # Decodes the given base64 string to plaintext. +# +################################################################################ -# encode64: Function to encode a string to base64. +# Function to encode a string to base64 encode64() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "encode64: Encode a string to base64" + echo + echo "Usage:" + echo " encode64 [string]" + echo " encode64 --help" + echo + echo "Arguments:" + echo " string The string to encode into base64 (optional)." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " echo \"Hello World\" | encode64" + echo " # Encodes \"Hello World\" to base64 via pipe." + echo + echo " encode64 \"Hello World\"" + echo " # Encodes \"Hello World\" to base64 directly from arguments." + echo + return 0 + fi + + # Encode input to base64 if [[ $# -eq 0 ]]; then + # Process input from stdin cat | base64 else - printf '%s' "$1" | base64 | base64 + # Process input from arguments + printf '%s' "$1" | base64 fi } -# decode64: Function to decode a base64 string. +# Function to decode a base64 string decode64() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "decode64: Decode a base64-encoded string" + echo + echo "Usage:" + echo " decode64 [base64_string]" + echo " decode64 --help" + echo + echo "Arguments:" + echo " base64_string The base64-encoded string to decode (optional)." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " echo \"SGVsbG8gV29ybGQK\" | decode64" + echo " # Decodes the base64 string via pipe." + echo + echo " decode64 \"SGVsbG8gV29ybGQK\"" + echo " # Decodes the given base64 string to plaintext." + echo + return 0 + fi + + # Decode input from base64 if [[ $# -eq 0 ]]; then + # Process input from stdin cat | base64 --decode else - printf '%s\n' "$1" | base64 | base64 --decode + # Process input from arguments + printf '%s\n' "$1" | base64 --decode fi } +# Aliases for convenience alias e64=encode64 # Encode to base64. alias d64=decode64 # Decode from base64. diff --git a/lib/functions/environment.sh b/lib/functions/environment.sh index c65c69f2..41288fb5 100644 --- a/lib/functions/environment.sh +++ b/lib/functions/environment.sh @@ -1,38 +1,78 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Environment Detector (environment) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# environment is a function that detects the current operating system +# environment. It identifies whether the system is macOS, Linux, or Windows +# (including Cygwin and MING environments). +# +# Usage: +# environment +# environment --help +# +# Arguments: +# --help Displays this help menu and exits. +# +# Examples: +# environment +# # Detects and displays the current operating system environment. +# +# environment --help +# # Displays the help menu. +# +################################################################################ -# environment: Function to detect the current environment +# Function to detect the current environment environment() { - # Define a fallback `OS` - LOCAL_OS="other" + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "environment: Environment Detector" + echo + echo "Usage:" + echo " environment" + echo " environment --help" + echo + echo "Arguments:" + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " environment" + echo " # Detects and displays the current operating system environment." + echo + echo " environment --help" + echo " # Displays the help menu." + echo + return 0 + fi - # Mac - if [[ "$(uname -s | grep -c Darwin)" -gt 0 ]] || true; then - LOCAL_OS="mac" + # Detect the environment + LOCAL_OS="other" # Fallback OS - # Linux - elif [[ "$(uname -s | grep -c Linux)" -gt 0 ]] || true; then - LOCAL_OS="linux" + # macOS + if [[ "$(uname -s | grep -c Darwin)" -gt 0 ]]; then + LOCAL_OS="mac" - # Windows via MING - elif [[ "$(uname -s | grep -c MING)" -gt 0 ]] || true; then - LOCAL_OS="win" + # Linux + elif [[ "$(uname -s | grep -c Linux)" -gt 0 ]]; then + LOCAL_OS="linux" - # Cygwin - elif [[ "$(uname -s | grep -c Cygwin)" -gt 0 ]] || true; then - LOCAL_OS="win" + # Windows via MING + elif [[ "$(uname -s | grep -c MING)" -gt 0 ]]; then + LOCAL_OS="win" - # Cygwin via Babun - elif [[ "$(uname -s | grep -c CYGWIN)" -gt 0 ]] || true; then - LOCAL_OS="win" + # Cygwin + elif [[ "$(uname -s | grep -c Cygwin)" -gt 0 ]]; then + LOCAL_OS="win" - fi - - # Output the result - echo "${LOCAL_OS}" + # Cygwin via Babun + elif [[ "$(uname -s | grep -c CYGWIN)" -gt 0 ]]; then + LOCAL_OS="win" + fi + # Output the result + echo "${LOCAL_OS}" } diff --git a/lib/functions/extract.sh b/lib/functions/extract.sh index 9430b4fc..941fc32a 100644 --- a/lib/functions/extract.sh +++ b/lib/functions/extract.sh @@ -1,34 +1,86 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Archive Extractor (extract) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# extract is a function to extract most known archive formats with a single +# command. It supports various archive types like .tar, .zip, .gz, .7z, and more. +# +# Usage: +# extract [file] +# extract --help +# +# Arguments: +# file The archive file to extract. +# --help Displays this help menu and exits. +# +# Examples: +# extract file.tar.gz +# # Extracts the contents of file.tar.gz. +# +# extract archive.zip +# # Extracts the contents of archive.zip. +# +# extract --help +# # Displays the help menu. +# +################################################################################ -# extract: Function to extract most know archives with one command +# Function to extract most known archive formats extract() { - if [[ "$#" != 1 ]]; then - echo "[ERROR] Please add one argument" >&2 - return 1 - fi + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "extract: Archive Extractor" + echo + echo "Usage:" + echo " extract [file]" + echo " extract --help" + echo + echo "Arguments:" + echo " file The archive file to extract." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " extract file.tar.gz" + echo " # Extracts the contents of file.tar.gz." + echo + echo " extract archive.zip" + echo " # Extracts the contents of archive.zip." + echo + echo " extract --help" + echo " # Displays the help menu." + echo + return 0 + fi - if [[ -f "$1" ]]; then - echo "[INFO] Extracting $1" - case $1 in - *.tar.bz2) tar xjf "$1" ;; - *.tar.gz) tar xzf "$1" ;; - *.bz2) bunzip2 "$1" ;; - *.rar) unrar e "$1" ;; - *.gz) gunzip "$1" ;; - *.tar) tar xf "$1" ;; - *.tbz2) tar xjf "$1" ;; - *.tgz) tar xzf "$1" ;; - *.zip) unzip "$1" ;; - *.Z) uncompress "$1" ;; - *.7z) 7z x "$1" ;; - *) echo "[ERROR] '$1' cannot be extracted via extract()" ;; - esac - else - echo "[ERROR] '$1' is not a valid file" - fi + # Validate input + if [[ "$#" != 1 ]]; then + echo "[ERROR] Please provide one argument (the archive file to extract)." >&2 + return 1 + fi + + # Check if the file exists + if [[ -f "$1" ]]; then + echo "[INFO] Extracting '$1'..." + case "$1" in + *.tar.bz2) tar xjf "$1" ;; + *.tar.gz) tar xzf "$1" ;; + *.bz2) bunzip2 "$1" ;; + *.rar) unrar e "$1" ;; + *.gz) gunzip "$1" ;; + *.tar) tar xf "$1" ;; + *.tbz2) tar xjf "$1" ;; + *.tgz) tar xzf "$1" ;; + *.zip) unzip "$1" ;; + *.Z) uncompress "$1" ;; + *.7z) 7z x "$1" ;; + *) echo "[ERROR] '$1' cannot be extracted via extract()." ;; + esac + else + echo "[ERROR] '$1' is not a valid file." >&2 + return 1 + fi } diff --git a/lib/functions/filehead.sh b/lib/functions/filehead.sh deleted file mode 100644 index 466b08d8..00000000 --- a/lib/functions/filehead.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# filehead: Function to display the first lines of a file. -filehead() { /usr/bin/xxd -u -g 1 "$@" | /usr/bin/head || true; } diff --git a/lib/functions/freespace.sh b/lib/functions/freespace.sh index c125ab62..a06be2e9 100644 --- a/lib/functions/freespace.sh +++ b/lib/functions/freespace.sh @@ -1,21 +1,67 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Free Disk Space Cleaner (freespace) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# freespace is a utility function to securely erase purgeable disk space with +# zeros on the selected disk using the `diskutil secureErase freespace` command. +# +# Usage: +# freespace [disk] +# freespace --help +# +# Arguments: +# disk The disk to clean purgeable space from (e.g., /dev/disk1s1). +# --help Displays this help menu and exits. +# +# Examples: +# freespace /dev/disk1s1 +# # Erases purgeable disk space with zeros on /dev/disk1s1. +# +# freespace --help +# # Displays the help menu. +# +################################################################################ -# Erases purgeable disk space with 0s on the selected disk freespace() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "freespace: Free Disk Space Cleaner" + echo + echo "Usage:" + echo " freespace [disk]" + echo " freespace --help" + echo + echo "Arguments:" + echo " disk The disk to clean purgeable space from (e.g., /dev/disk1s1)." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " freespace /dev/disk1s1" + echo " # Erases purgeable disk space with zeros on /dev/disk1s1." + echo + echo " freespace --help" + echo " # Displays the help menu." + echo + echo "Available Disks:" + df -h | awk 'NR == 1 || /^\/dev\/disk/' + echo + return 0 + fi + + # Check if a disk argument is provided if [[ -z "$1" ]]; then - echo "Usage: $0 " - echo "Example: $0 /dev/disk1s1" + echo "[ERROR] No disk provided. Use 'freespace --help' for usage information." echo - echo "Possible disks:" - df -h | awk 'NR == 1 || /^\/dev\/disk/' || true + echo "Available Disks:" + df -h | awk 'NR == 1 || /^\/dev\/disk/' return 1 fi - echo "Cleaning purgeable files from disk: $1 ...." + # Perform secure erase of free space on the selected disk + echo "[INFO] Cleaning purgeable files from disk: $1..." diskutil secureErase freespace 0 "$1" } diff --git a/lib/functions/genpwd.sh b/lib/functions/genpwd.sh index a6520cb4..c624090d 100644 --- a/lib/functions/genpwd.sh +++ b/lib/functions/genpwd.sh @@ -1,41 +1,105 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Password Generator (genpwd) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# genpwd generates a strong random password with customizable length and +# separator. The user can specify the number of blocks and a separator +# character. Each block consists of 6 characters (5 alphanumeric + 1 special). +# +# Usage: +# genpwd [num_blocks] [separator] +# +# Arguments: +# num_blocks Number of blocks of 6 characters to generate (default: 3). +# separator Custom separator between blocks (default: '-'). +# +# Examples: +# genpwd # Generates a password with 3 blocks separated by '-' +# genpwd 5 / # Generates a password with 5 blocks separated by '/' +# genpwd 6 : # Generates a password with 6 blocks separated by ':' +# +# Clipboard Support: +# If a clipboard utility is available (pbcopy, xclip, wl-copy, or clip), the +# password will automatically be copied to the clipboard. +# +################################################################################ -# Function to generates a strong random password of 27 characters -#!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - https://dotfiles.io -# Made with β™₯ in London, UK by @sebastienrousseau -# Copyright (c) 2015-2025. All rights reserved -# License: MIT - -# genpwd: Function to generates a strong random password of 20 characters (similar to Apple) genpwd() { - # Define the special characters - SPECIAL="!@#$%^&*()+=[]{};':,.?~" + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "genpwd: Generate a strong random password with customizable length and separator" + echo + echo "Usage:" + echo " genpwd [num_blocks] [separator]" + echo + echo "Arguments:" + echo " num_blocks Number of blocks of 6 characters to generate (default: 3)." + echo " separator Custom separator between blocks (default: '-')." + echo + echo "Examples:" + echo " genpwd # Generates a password with 3 blocks separated by '-'" + echo " genpwd 5 / # Generates a password with 5 blocks separated by '/'" + echo " genpwd 6 : # Generates a password with 6 blocks separated by ':'" + echo + echo "Clipboard Support:" + echo " If a clipboard utility is available (pbcopy, xclip, wl-copy, or clip), the password will" + echo " automatically be copied to the clipboard." + echo + return 0 + fi + + # Check for required tools + if ! command -v openssl &>/dev/null; then + echo "[ERROR] 'openssl' is required but not installed. Please install it and try again." >&2 + return 1 + fi - # Generate 3 random strings of length 8 - m=$(openssl rand -base64 32 | tr -dc '[:alnum:]' | fold -w 8 | head -n 1 || true) - a=$(openssl rand -base64 32 | tr -dc '[:alnum:]' | fold -w 8 | head -n 1 || true) - c=$(openssl rand -base64 32 | tr -dc '[:alnum:]' | fold -w 8 | head -n 1 || true) + # Define the number of blocks (default: 3) and separator (default: '-') + local num_blocks="${1:-3}" # Number of blocks + local separator="${2:--}" # Separator between blocks + local SPECIAL="!@#$%^&*()+=[]{};':,.?~|<>€Β₯_" # Special characters - # Choose random positions for the special characters - m_pos=$((RANDOM % 8)) - a_pos=$((RANDOM % 8)) - c_pos=$((RANDOM % 8)) + # Generate a sufficiently long random alphanumeric base + local base_password=$(openssl rand -base64 128 | tr -dc '[:alnum:]') - # Choose a random special character from the list - special_char1="${SPECIAL:$((RANDOM % ${#SPECIAL})):1}" - special_char2="${SPECIAL:$((RANDOM % ${#SPECIAL})):1}" - special_char3="${SPECIAL:$((RANDOM % ${#SPECIAL})):1}" + # Initialize the password variable + local password="" + + # Build the password with the specified number of blocks + for ((i = 0; i < num_blocks; i++)); do + # Generate a random 6-character block with special characters + local block="${base_password:$((i * 6)):5}${SPECIAL:$((RANDOM % ${#SPECIAL})):1}" + + # Append the block to the password + if [[ -n "$password" ]]; then + password+="${separator}" + fi + password+="${block}" + done - # Combine the strings with the special character to form the password - pwd="${m:0:${m_pos}}${special_char1}${m:${m_pos}}-${a:0:${a_pos}}${special_char2}${a:${a_pos}}-${c:0:${c_pos}}${special_char3}${c:${c_pos}}" + # Output the password + echo "[INFO] Generated password: ${password}" - echo "[INFO] The password has been copied to the clipboard: ${pwd}" - echo "${pwd}" | pbcopy | pbpaste || true + # Copy to clipboard if possible + if command -v pbcopy &>/dev/null; then + echo -n "${password}" | pbcopy + echo "[INFO] Password copied to clipboard (macOS)." + elif command -v xclip &>/dev/null; then + echo -n "${password}" | xclip -selection clipboard + echo "[INFO] Password copied to clipboard (Linux)." + elif command -v wl-copy &>/dev/null; then + echo -n "${password}" | wl-copy + echo "[INFO] Password copied to clipboard (Linux with Wayland)." + elif command -v clip &>/dev/null; then + echo -n "${password}" | clip + echo "[INFO] Password copied to clipboard (Windows)." + else + echo "[WARNING] Clipboard tool not found. Password not copied to clipboard." + fi + return 0 } diff --git a/lib/functions/goto.sh b/lib/functions/goto.sh index f6145123..bc35c73f 100644 --- a/lib/functions/goto.sh +++ b/lib/functions/goto.sh @@ -1,16 +1,67 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Change Directory Helper (goto) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# goto is a utility function to quickly navigate to a specified directory. +# It changes to the given directory and lists its contents. +# +# Usage: +# goto [directory] +# goto --help +# +# Arguments: +# directory The directory to navigate to. +# --help Displays this help menu and exits. +# +# Examples: +# goto /tmp +# # Changes to the /tmp directory and lists its contents. +# +# goto --help +# # Displays the help menu. +# +################################################################################ -# goto: Function to change to the directory inputed +# Function to change to the specified directory and list its contents goto() { - if [[ -e "$1" ]]; then - cd "$1" || exit - l + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "goto: Change Directory Helper" + echo + echo "Usage:" + echo " goto [directory]" + echo " goto --help" + echo + echo "Arguments:" + echo " directory The directory to navigate to." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " goto /tmp" + echo " # Changes to the /tmp directory and lists its contents." + echo + echo " goto --help" + echo " # Displays the help menu." + echo + return 0 + fi + + # Check if a directory is provided + if [[ -z "$1" ]]; then + echo "[ERROR] No directory provided. Use 'goto --help' for usage information." >&2 + return 1 + fi + + # Check if the directory exists + if [[ -d "$1" ]]; then + cd "$1" || return + ls -lh --group-directories-first else - echo "[ERROR] Please add a directory name" >&2 + echo "[ERROR] '$1' is not a valid directory." >&2 + return 1 fi } diff --git a/lib/functions/hexdump.sh b/lib/functions/hexdump.sh new file mode 100644 index 00000000..4e447458 --- /dev/null +++ b/lib/functions/hexdump.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash + +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Hex Dump Viewer (hexdump) +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# Description: +# hexdump is a utility function to display the contents of a file in a +# hex dump format. By default, it shows the entire file unless a line limit +# is specified. +# +# Usage: +# hexdump [file] [lines] +# hexdump --all +# hexdump --help +# +# Arguments: +# file The file to display in hex dump format. +# lines The number of lines to display (optional, default: all lines). +# --all Displays the entire file in hex dump format. +# --help Displays this help menu and exits. +# +# Examples: +# hexdump example.txt +# # Displays the entire file 'example.txt' in hex dump format. +# +# hexdump example.txt 20 +# # Displays the first 20 lines of the file 'example.txt' in hex dump format. +# +# hexdump --help +# # Displays the help menu. +# +################################################################################ + +hexdump() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "hexdump: Hex Dump Viewer" + echo + echo "Usage:" + echo " hexdump [file] [lines]" + echo " hexdump --all" + echo " hexdump --help" + echo + echo "Arguments:" + echo " file The file to display in hex dump format." + echo " lines The number of lines to display (optional, default: all lines)." + echo " --all Displays the entire file in hex dump format." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " hexdump example.txt" + echo " # Displays the entire file 'example.txt' in hex dump format." + echo + echo " hexdump example.txt 20" + echo " # Displays the first 20 lines of the file 'example.txt' in hex dump format." + echo + echo " hexdump --help" + echo " # Displays the help menu." + echo + return 0 + fi + + # Check if no arguments are provided + if [[ -z "$1" ]]; then + echo "[ERROR] No file provided. Use 'hexdump --help' for usage information." >&2 + return 1 + fi + + # Handle --all option + if [[ "$1" == "--all" ]]; then + echo "[ERROR] '--all' requires a file argument. Use 'hexdump file.txt' instead." >&2 + return 1 + fi + + # Check if the file exists + if [[ ! -f "$1" ]]; then + echo "[ERROR] '$1' is not a valid file." >&2 + return 1 + fi + + # Detect file type + echo "[INFO] File type: $(file "$1")" + + # Display hex dump + if [[ -z "$2" || "$2" == "--all" ]]; then + # Show the entire file if no line limit or --all is specified + echo "[INFO] Showing full file in hex dump format:" + /usr/bin/xxd -u -g 1 "$1" + else + # Limit output to the specified number of lines + echo "[INFO] Showing first $2 lines in hex dump format:" + /usr/bin/xxd -u -g 1 "$1" | /usr/bin/head -n "$2" + fi +} diff --git a/lib/functions/hiddenfiles.sh b/lib/functions/hiddenfiles.sh new file mode 100644 index 00000000..01fe16a7 --- /dev/null +++ b/lib/functions/hiddenfiles.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Hidden Files Visibility Toggle (hiddenfiles) +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# Description: +# hiddenfiles is a utility function to toggle the visibility of hidden files +# and system files in the Finder on macOS. By default, it hides hidden files. +# +# Usage: +# hiddenfiles [show|hide] +# hiddenfiles --help +# +# Arguments: +# show Show hidden files and system files in Finder. +# hide Hide hidden files and system files in Finder (default behavior). +# --help Displays this help menu and exits. +# +# Examples: +# hiddenfiles hide +# # Hides hidden files and system files in Finder. +# +# hiddenfiles show +# # Shows hidden files and system files in Finder. +# +# hiddenfiles --help +# # Displays the help menu. +# +################################################################################ + +hiddenfiles() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "hiddenfiles: Hidden Files Visibility Toggle" + echo + echo "Usage:" + echo " hiddenfiles [show|hide]" + echo " hiddenfiles --help" + echo + echo "Arguments:" + echo " show Show hidden files and system files in Finder." + echo " hide Hide hidden files and system files in Finder (default behavior)." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " hiddenfiles hide" + echo " # Hides hidden files and system files in Finder." + echo + echo " hiddenfiles show" + echo " # Shows hidden files and system files in Finder." + echo + return 0 + fi + + # Set default action to 'hide' if no argument is provided + local action="${1:-hide}" + + if [[ "$action" == "hide" ]]; then + echo "[INFO] Hiding hidden files and system files in Finder..." + defaults write com.apple.Finder AppleShowAllFiles NO + elif [[ "$action" == "show" ]]; then + echo "[INFO] Showing hidden files and system files in Finder..." + defaults write com.apple.Finder AppleShowAllFiles YES + else + echo "[ERROR] Invalid argument: '$1'. Use 'hiddenfiles --help' for usage information." >&2 + return 1 + fi + + # Restart Finder to apply changes + osascript -e 'tell application "Finder" to quit' + sleep 0.25 + osascript -e 'tell application "Finder" to activate' + + echo "[INFO] Finder settings updated successfully." +} diff --git a/lib/functions/hidehiddenfiles.sh b/lib/functions/hidehiddenfiles.sh deleted file mode 100644 index baa8cc96..00000000 --- a/lib/functions/hidehiddenfiles.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# License: MIT - -# Hide hidden system and dotfile files -hidehiddenfiles() { - defaults write com.apple.Finder AppleShowAllFiles NO - osascript -e 'tell application "Finder" to quit' - sleep 0.25 - osascript -e 'tell application "Finder" to activate' -} diff --git a/lib/functions/hostinfo.sh b/lib/functions/hostinfo.sh index 6f7e9a2f..8884c629 100644 --- a/lib/functions/hostinfo.sh +++ b/lib/functions/hostinfo.sh @@ -1,27 +1,98 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Host Information Viewer (hostinfo) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# hostinfo is a utility function to display detailed information about the +# current host in a structured table format. This includes system stats, +# network configuration, and public-facing IP address. +# +# Usage: +# hostinfo +# hostinfo --help +# +# Arguments: +# --help Displays this help menu and exits. +# +# Examples: +# hostinfo +# # Displays detailed host information in a table format. +# +# hostinfo --help +# # Displays the help menu. +# +################################################################################ -# hostinfo: Function to display useful host related informaton hostinfo() { - echo "You are logged on" - $HOST - echo "Additionnal information: " - uname -a - echo "Users logged on: " - w -h - echo "Current date : " - date - echo "Machine stats : " - uptime - echo "Current network location : " - scselect - echo "Public facing IP Address : " - myip - echo "DNS Configuration: " - scutil --dns - echo + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "hostinfo: Host Information Viewer" + echo + echo "Usage:" + echo " hostinfo" + echo " hostinfo --help" + echo + echo "Arguments:" + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " hostinfo" + echo " # Displays detailed host information in a table format." + echo + echo " hostinfo --help" + echo " # Displays the help menu." + echo + return 0 + fi + + # Fetch host information + local username + local hostname + local system_info + local users_logged_on + local current_date + local machine_stats + local network_location="Not available" + local public_ip="Not available" + local dns_config="Not available" + + username=$(whoami) + hostname=$(hostname) + system_info=$(uname -a) + users_logged_on=$(w -h | awk '{print $1}' | sort | uniq | paste -sd ", " -) + current_date=$(date) + machine_stats=$(uptime | sed 's/^ *//') + + # Check if scselect is available (macOS specific) + if command -v scselect &>/dev/null; then + network_location=$(scselect | grep '^ *\*' | sed 's/^ *\* //') + fi + + # Fetch public IP address using a reliable service + if command -v curl &>/dev/null; then + public_ip=$(curl -s https://api.ipify.org || echo "Not available") + elif command -v wget &>/dev/null; then + public_ip=$(wget -qO- https://api.ipify.org || echo "Not available") + fi + + # Fetch DNS configuration (macOS specific) + if command -v scutil &>/dev/null; then + dns_config=$(scutil --dns | awk '/nameserver/ {print $3}' | paste -sd ", " -) + fi + + # Display information in a table format + echo "=====================================" + printf "%-25s : %s\n" "Username" "$username" + printf "%-25s : %s\n" "Hostname" "$hostname" + printf "%-25s : %s\n" "System Information" "$system_info" + printf "%-25s : %s\n" "Users Logged On" "${users_logged_on:-None}" + printf "%-25s : %s\n" "Current Date" "$current_date" + printf "%-25s : %s\n" "Machine Stats" "$machine_stats" + printf "%-25s : %s\n" "Network Location" "$network_location" + printf "%-25s : %s\n" "Public IP Address" "$public_ip" + printf "%-25s : %s\n" "DNS Servers" "${dns_config:-None}" + echo "=====================================" } diff --git a/lib/functions/hstats.sh b/lib/functions/hstats.sh index 29c69611..040885eb 100644 --- a/lib/functions/hstats.sh +++ b/lib/functions/hstats.sh @@ -1,11 +1,75 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - History Statistics Viewer (hstats) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# hstats is a utility function to display statistics about the most commonly +# used commands from the shell history. It shows the top 20 commands along +# with their usage count and the full command. +# +# Usage: +# hstats +# hstats --help +# +# Arguments: +# --help Displays this help menu and exits. +# +# Examples: +# hstats +# # Displays the top 20 most commonly used commands from shell history. +# +# hstats --help +# # Displays the help menu. +# +################################################################################ -# hstats: Function to display Ze Shell history stats informaton hstats() { - history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20 + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "hstats: History Statistics Viewer" + echo + echo "Usage:" + echo " hstats" + echo " hstats --help" + echo + echo "Arguments:" + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " hstats" + echo " # Displays the top 20 most commonly used commands from shell history." + echo + echo " hstats --help" + echo " # Displays the help menu." + echo + return 0 + fi + + # Ensure the history command is available + if ! command -v history &>/dev/null; then + echo "[ERROR] 'history' command is not available in this shell." >&2 + return 1 + fi + + # Extract only the commands from history, removing timestamps or extra metadata + if [[ "$SHELL" =~ "zsh" ]]; then + # For zsh, use `fc -l` to get clean commands + history_output=$(fc -l 1 | awk '{$1=""; print $0}') + else + # For bash, use `history` directly + history_output=$(history | awk '{$1=""; print $0}') + fi + + # Generate statistics + echo "============================================" + echo "Commonly Used Commands" + echo "============================================" + echo "$history_output" | awk '{CMD[$1]++; count++;} END {for (a in CMD) printf "%-15s %s\n", CMD[a], a;}' \ + | sort -nr \ + | head -n20 \ + | nl + echo "============================================" } diff --git a/lib/functions/httpdebug.sh b/lib/functions/httpdebug.sh index fa31fb0e..76aabd0e 100644 --- a/lib/functions/httpdebug.sh +++ b/lib/functions/httpdebug.sh @@ -1,9 +1,113 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - HTTP Debugging Utility (httpdebug) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# httpdebug is a utility function to debug HTTP requests by measuring the +# timing of various stages of the request process in milliseconds. This +# includes DNS lookup, connection establishment, SSL handshake, and total +# request time. It also provides details like the server IP address. +# +# Usage: +# httpdebug [options] [url] +# httpdebug --help +# +# Arguments: +# options Additional curl options (optional). +# url The URL to debug. +# --help Displays this help menu and exits. +# +# Examples: +# httpdebug https://example.com +# # Debugs the HTTP request to https://example.com and displays timing info. +# +# httpdebug -v https://example.com +# # Debugs the HTTP request with verbose output from curl. +# +# httpdebug --help +# # Displays the help menu. +# +################################################################################ + +httpdebug() { + # Display help menu + if [[ "$1" == "--help" ]]; then + echo "httpdebug: HTTP Debugging Utility" + echo + echo "Usage:" + echo " httpdebug [options] [url]" + echo " httpdebug --help" + echo + echo "Arguments:" + echo " options Additional curl options (optional)." + echo " url The URL to debug." + echo " --help Displays this help menu and exits." + echo + echo "Examples:" + echo " httpdebug https://example.com" + echo " # Debugs the HTTP request to https://example.com and displays timing info." + echo + echo " httpdebug -v https://example.com" + echo " # Debugs the HTTP request with verbose output from curl." + echo + echo " httpdebug --help" + echo " # Displays the help menu." + echo + return 0 + fi + + # Ensure curl is available + if ! command -v curl &>/dev/null; then + echo "[ERROR] 'curl' command is required but not installed. Please install it and try again." >&2 + return 1 + fi + + # Check if a URL or options are provided + if [[ -z "$1" ]]; then + echo "[ERROR] No URL provided. Use 'httpdebug --help' for usage information." >&2 + return 1 + fi + + # Perform HTTP request and measure timing + echo "[INFO] Debugging HTTP request to: ${*}" + curl_output=$(/usr/bin/curl "$@" -o /dev/null -s -w "\ +IP Address: %{remote_ip}\n\ +DNS Lookup: %{time_namelookup}\n\ +TCP Connection: %{time_connect}\n\ +SSL Handshake: %{time_appconnect}\n\ +Server Processing: %{time_pretransfer}\n\ +Time to First Byte: %{time_starttransfer}\n\ +Total Time: %{time_total}\n") + + # Display results in a clean table format + printf "%-25s %-25s %-45s\n" "Metric" "Details" "Description" + printf "%-25s %-25s %-45s\n" "------------------------" "------------------------" "---------------------------------------------" + + echo "$curl_output" | while IFS= read -r line; do + metric=$(echo "$line" | awk -F: '{print $1}') + value=$(echo "$line" | awk -F: '{print $2}' | xargs) + description="" + + case "$metric" in + "IP Address") description="IP address of the server" ;; + "DNS Lookup") description="Time to resolve the domain name to an IP address" ;; + "TCP Connection") description="Time to establish a TCP connection to the server" ;; + "SSL Handshake") description="Time to complete the SSL/TLS handshake (if applicable)" ;; + "Server Processing") description="Time from connection to server readiness to transfer data" ;; + "Time to First Byte") description="Time until the first byte of the response is received" ;; + "Total Time") description="Total time for the request, including all stages" ;; + esac + + if [[ "$metric" == "IP Address" ]]; then + printf "%-25s %-25s %-45s\n" "$metric" "$value" "$description" + else + # Convert time values to milliseconds for consistency + time_in_milliseconds=$(awk "BEGIN {printf \"%.2f\", $value * 1000}") + printf "%-25s %-25s %-45s\n" "$metric" "$time_in_milliseconds ms" "$description" + fi + done +} -# httpdebug: Function to download a web page and show info on what took time -httpdebug() { /usr/bin/curl "$@" -o /dev/null -w "dns: %{time_namelookup} connect: %{time_connect} pretransfer: %{time_pretransfer} starttransfer: %{time_starttransfer} total: %{time_total}\\n"; } diff --git a/lib/functions/kebabcase.sh b/lib/functions/kebabcase.sh new file mode 100644 index 00000000..93046cb1 --- /dev/null +++ b/lib/functions/kebabcase.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform Kebabcase Utility (kebabcase) +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# Description: +# kebabcase converts file or directory names to kebab-case. All letters +# are lowercase and spaces or other non-alphanumeric characters are replaced +# by hyphens. +# +# Usage: +# kebabcase [ ...] +# +# Arguments: +# One or more file or directory paths to rename +# to kebab-case. +# +# Notes: +# - Already kebab-case files are skipped. +# - Non-existent paths will produce an error message. +# - Special characters (other than alphanumeric and '.') are replaced +# with hyphens. +# +################################################################################ + +kebabcase() { + if [[ "$#" -lt 1 ]]; then + echo "[ERROR] Please provide at least one file or directory to convert to kebab-case." >&2 + return 1 + fi + + for file in "$@"; do + if [[ ! -e "$file" ]]; then + echo "[ERROR] The file or directory '$file' does not exist." >&2 + continue + fi + + dirname=$(dirname "$file") + filename=$(basename "$file") + + # Convert to lowercase and replace non-alphanumeric chars (except '.') with hyphens + kc_filename=$(printf "%s" "$filename" \ + | tr '[:upper:]' '[:lower:]' \ + | sed 's/[^[:alnum:].]/-/g') + + # If already kebab-case, skip + if [[ "$filename" == "$kc_filename" ]]; then + echo "[INFO] '$file' is already in kebab-case." + continue + fi + + newname="${dirname}/${kc_filename}" + if mv "$file" "$newname"; then + echo "[INFO] Renamed '$file' to '$newname'." + else + echo "[ERROR] Failed to rename '$file'." >&2 + fi + done +} diff --git a/lib/functions/keygen.sh b/lib/functions/keygen.sh index 5ec0d2da..616b0e69 100644 --- a/lib/functions/keygen.sh +++ b/lib/functions/keygen.sh @@ -1,31 +1,194 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - SSH Key Generator (keygen) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# keygen is a utility function to generate high-quality SSH key pairs with +# strong encryption and entropy. Supports ed25519, RSA, ECDSA, and DSA keys +# with configurable key lengths. +# +# Usage: +# keygen [name] [email] [type] [bits] +# keygen --help +# +# Arguments: +# name The name for the SSH key (e.g., username, service name) +# email The email address associated with the key +# type Key type (ed25519, rsa, ecdsa, dsa). Default: ed25519 +# bits Key length in bits (RSA: 2048-8192, ECDSA: 256/384/521) +# --help Displays this help menu and exits +# +################################################################################ + +log_info() { + echo "[INFO] $*" +} + +log_warning() { + echo "[WARNING] $*" >&2 +} + +log_error() { + echo "[ERROR] $*" >&2 + exit 1 +} -# keygen: Function to generates SSH key keygen() { - if [[ $# -eq 0 ]]; then - echo "What's the name of the Key (no space please)? " - read -r name - echo "What's the email associated with it? " - read -r email - elif [[ $# -eq 1 ]]; then - name="$1" - echo "What's the email associated with the key? " - read -r email - elif [[ $# -eq 2 ]]; then - name="$1" - email="$2" - else - echo "Usage: keygen [name] [email]" - return 1 - fi - - ssh-keygen -t rsa -f ~/.ssh/id_rsa_"${name}" -C "${email}" - ssh-add ~/.ssh/id_rsa_"${name}" - pbcopy <~/.ssh/id_rsa_"${name}".pub - echo "[INFO] SSH Key id_rsa_${name}.pub copied in your clipboard" + # Display help menu + if [[ "$1" == "--help" ]]; then + cat << 'EOH' +SSH Key Generator (keygen) + +Description: + keygen is a utility function to generate high-quality SSH key pairs with + strong encryption and entropy. Supports ed25519, RSA, ECDSA, and DSA keys + with configurable key lengths. + +Usage: + keygen [name] [email] [type] [bits] + keygen --help + +Arguments: + name The name for the SSH key (e.g., username, service name). + This name is used to create a unique file path for the key. + email The email address associated with the key. + type Key type (ed25519, rsa, ecdsa, dsa). Default: ed25519. + bits Key length in bits: + - RSA: 2048-8192 bits (default: 4096). + - ECDSA: 256, 384, or 521 bits (default: 256). + - DSA: 1024, 2048, or 3072 bits (default: 3072). + - ED25519: Fixed length. + --help Displays this help menu and exits. + +Examples: + keygen + # Interactive mode with prompts. + + keygen mykey myemail@example.com + # Generates an ed25519 key pair named 'mykey'. + + keygen mykey myemail@example.com rsa 4096 + # Generates a 4096-bit RSA key pair named 'mykey'. + + keygen mykey myemail@example.com ecdsa 256 + # Generates a 256-bit ECDSA key pair named 'mykey'. + + keygen mykey myemail@example.com dsa 1024 + # Generates a 1024-bit DSA key pair named 'mykey'. + +Notes: + - Keys are stored in ~/.ssh with the specified name. + - Public keys are copied to the clipboard for convenience. + - The private key is never exposed; keep it secure. + +EOH + return 0 + fi + + # Ensure ~/.ssh directory exists + mkdir -p -m 700 ~/.ssh || log_error "Failed to create ~/.ssh directory." + + # Collect inputs + local name email key_type key_bits + if [[ $# -eq 0 ]]; then + echo "Enter a unique name for the SSH key (e.g., 'myserver' or 'username'):" + read -r name + echo "Enter an email address associated with the key:" + read -r email + echo "Enter key type (ed25519, rsa, ecdsa, dsa) [default: ed25519]:" + read -r key_type + key_type="${key_type:-ed25519}" + + if [[ "${key_type}" != "ed25519" ]]; then + case "${key_type}" in + "rsa") echo "Enter RSA key length (2048-8192) [default: 4096]:" && read -r key_bits ;; + "ecdsa") echo "Enter ECDSA key length (256/384/521) [default: 256]:" && read -r key_bits ;; + "dsa") echo "Enter DSA key length (1024/2048/3072) [default: 3072]:" && read -r key_bits ;; + *) log_error "Invalid key type: ${key_type}" ;; + esac + fi + elif [[ $# -ge 2 ]]; then + name="$1" + email="$2" + key_type="${3:-ed25519}" + key_bits="$4" + else + log_error "Usage: keygen [name] [email] [type] [bits] or keygen --help" + fi + + # Validate inputs + [[ ! "${name}" =~ ^[a-zA-Z0-9_-]+$ ]] && log_error "Invalid name format. Only alphanumeric, _, and - are allowed." + [[ ! "${email}" =~ ^[^@]+@[^@]+\.[^@]+$ ]] && log_error "Invalid email format." + + # Key validation + key_type="${key_type:-ed25519}" + case "${key_type}" in + "ed25519") ;; + "rsa") + key_bits="${key_bits:-4096}" + [[ ! "${key_bits}" =~ ^[0-9]+$ ]] && log_error "RSA key length must be a number." + [[ "${key_bits}" -lt 2048 || "${key_bits}" -gt 8192 ]] && log_error "RSA key length must be between 2048 and 8192 bits." + ;; + "ecdsa") + key_bits="${key_bits:-256}" + [[ ! "${key_bits}" =~ ^(256|384|521)$ ]] && log_error "ECDSA key length must be 256, 384, or 521 bits." + ;; + "dsa") + key_bits="${key_bits:-3072}" + [[ ! "${key_bits}" =~ ^(1024|2048|3072)$ ]] && log_error "DSA key length must be 1024, 2048, or 3072 bits." + ;; + *) log_error "Invalid key type: ${key_type}. Use 'ed25519', 'rsa', 'ecdsa', or 'dsa'." ;; + esac + + # Set file paths + local key_path="${HOME}/.ssh/id_${key_type}_${name}" + + # Generate key pair + log_info "Generating ${key_type} SSH key named '${name}'..." + if [[ "${key_type}" == "ed25519" ]]; then + ssh-keygen -t ed25519 -f "${key_path}" -C "${email}" + else + ssh-keygen -t "${key_type}" -b "${key_bits}" -f "${key_path}" -C "${email}" + fi + + # Set permissions + chmod 600 "${key_path}" && chmod 644 "${key_path}.pub" + + # Add to SSH agent + if ! ssh-add "${key_path}" &>/dev/null; then + log_warning "SSH agent not running. Start it and run 'ssh-add ${key_path}'." + fi + + # Copy to clipboard + copy_to_clipboard "${key_path}.pub" + + # Display success message + log_info "SSH key successfully generated!" + echo " Private key: ${key_path}" + echo " Public key: ${key_path}.pub" + + # Display fingerprint + ssh-keygen -l -f "${key_path}.pub" +} + +copy_to_clipboard() { + local pub_key_file="$1" + if command -v pbcopy &>/dev/null; then + pbcopy < "${pub_key_file}" + log_info "Public key copied to clipboard (macOS)." + elif command -v xclip &>/dev/null; then + xclip -selection clipboard < "${pub_key_file}" + log_info "Public key copied to clipboard (Linux)." + elif command -v wl-copy &>/dev/null; then + wl-copy < "${pub_key_file}" + log_info "Public key copied to clipboard (Wayland)." + elif command -v clip.exe &>/dev/null; then + clip.exe < "${pub_key_file}" + log_info "Public key copied to clipboard (Windows)." + else + log_warning "Clipboard tool not available. Public key not copied." + fi } diff --git a/lib/functions/last.sh b/lib/functions/last.sh index a6c7884e..541fd869 100644 --- a/lib/functions/last.sh +++ b/lib/functions/last.sh @@ -1,11 +1,112 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Recently Modified Files Viewer (last) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# last is a utility function to list recently modified files within a +# specified time range. By default, it lists files modified in the last 60 +# minutes but allows customization. +# +# Usage: +# last [minutes] +# last --help +# +# Arguments: +# minutes Number of minutes to look back for modified files (default: 60) +# Maximum: 7 days (10080 minutes) +# --help Displays this help menu and exits +# +################################################################################ + +log_info() { + echo "[INFO] $*" +} + +log_error() { + echo "[ERROR] $*" >&2 + exit 1 +} + +detect_tool() { + if command -v /usr/bin/find &>/dev/null; then + echo "find" + elif command -v fd &>/dev/null; then + echo "fd" + elif command -v rg &>/dev/null; then + echo "rg" + else + log_error "No compatible tools found (find, fd, or rg)." + fi +} -# last: List the modified files within 60 minutes. last() { - find . -type f -mmin -60 + # Display help menu + if [[ "$1" == "--help" ]]; then + cat << 'EOH' +πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Recently Modified Files Viewer + +Description: + last is a utility function to list recently modified files within a specified + time range. By default, it lists files modified in the last 60 minutes. + +Usage: + last [minutes] + last --help + +Arguments: + minutes Number of minutes to look back for modified files (default: 60) + Maximum: 7 days (10080 minutes) + --help Displays this help menu and exits + +Examples: + last + # Lists files modified within the last 60 minutes + last 120 + # Lists files modified within the last 120 minutes + +Notes: + - Only regular files are shown + - Symbolic links and directories are excluded from the results + - Searches recursively starting from the current directory + - Maximum time range is 7 days (10080 minutes) +EOH + return 0 + fi + + # Default time range (60 minutes) + local minutes=${1:-60} + + # Validate that the input is a positive integer + if ! [[ "$minutes" =~ ^[0-9]+$ ]]; then + log_error "Invalid input: '$minutes'. Please provide a positive integer for minutes." + fi + + # Check maximum time range (7 days = 10080 minutes) + if ((minutes > 10080)); then + log_error "Time range too large. Maximum is 7 days (10080 minutes)." + fi + + # Detect which tool to use + local tool + tool=$(detect_tool) + + # Find and list modified files + log_info "Listing files modified in the last ${minutes} minutes (using $tool):" + case "$tool" in + "find") + /usr/bin/find . -type f -mmin -"${minutes}" + ;; + "fd") + fd --type file --changed-within "${minutes}m" + ;; + "rg") + rg --type file --changed-within "${minutes}m" + ;; + *) + log_error "Unknown tool detected." + ;; + esac } diff --git a/lib/functions/logout.sh b/lib/functions/logout.sh index 48a17ca0..0894ab48 100644 --- a/lib/functions/logout.sh +++ b/lib/functions/logout.sh @@ -1,12 +1,120 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform Logout Utility (logout) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# logout is a utility function to log out from macOS, Linux, or Windows via +# the terminal. It provides options for confirmation and forceful logout if +# necessary. +# +# Usage: +# logout [--force] [--help] +# +# Arguments: +# --force Skips confirmation and forces logout. +# --help Displays this help menu and exits. +# +################################################################################ + +log_info() { + echo "[INFO] $*" +} + +log_warning() { + echo "[WARNING] $*" >&2 +} + +log_error() { + echo "[ERROR] $*" >&2 + exit 1 +} -# logout: Function to logout from OS X via the Terminal logout() { - osascript -e 'tell application "System Events" to log out' - builtin logout + # Display help menu + if [[ "$1" == "--help" ]]; then + cat << 'EOH' +Cross-Platform Logout Utility (logout) + +Description: + logout is a utility function to log out from macOS, Linux, or Windows via the + terminal. It provides options for confirmation and forceful logout if + necessary. + +Usage: + logout [--force] [--help] + +Arguments: + --force Skips confirmation and forces logout. + --help Displays this help menu and exits. + +Examples: + logout + # Prompts for confirmation before logging out. + + logout --force + # Logs out immediately without confirmation. + +Notes: + - Requires administrative privileges for some systems (Linux/Windows). + - May prompt for a password depending on system settings. +EOH + return 0 + fi + + # Check if the user passed --force + local force=false + if [[ "$1" == "--force" ]]; then + force=true + fi + + # Prompt for confirmation if not forced + if [[ "$force" == false ]]; then + echo "Are you sure you want to log out? (y/n):" + read -r response + case "$response" in + [Yy]*) + ;; + *) + log_info "Logout canceled." + return 0 + ;; + esac + fi + + # Detect operating system + local os + os=$(uname | tr '[:upper:]' '[:lower:]') + + case "$os" in + "darwin") + log_info "Logging out from macOS..." + if ! osascript -e 'tell application "System Events" to log out'; then + log_error "Failed to log out using AppleScript. Try logging out manually." + fi + ;; + "linux") + log_info "Logging out from Linux..." + if command -v gnome-session-quit &>/dev/null; then + gnome-session-quit --logout --no-prompt + elif command -v loginctl &>/dev/null; then + loginctl terminate-user "$USER" + else + log_error "Unable to determine logout method for your Linux system. Try logging out manually." + fi + ;; + "msys" | "cygwin" | "mingw"*) + log_info "Logging out from Windows..." + if ! shutdown /l; then + log_error "Failed to log out from Windows. Try logging out manually." + fi + ;; + *) + log_error "Unsupported operating system: $os" + ;; + esac + + return 0 } diff --git a/lib/functions/lowercase.sh b/lib/functions/lowercase.sh index 1023eb37..aa0e865e 100644 --- a/lib/functions/lowercase.sh +++ b/lib/functions/lowercase.sh @@ -1,29 +1,61 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform Lowercase Utility (lowercase) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# lowercase is a utility function that converts file or directory names to +# lowercase. It supports multiple arguments and provides informative messages +# for each operation, including errors and successful renames. +# +# Usage: +# lowercase [ ...] +# +# Arguments: +# One or more file or directory paths to rename +# to lowercase. +# +# Notes: +# - This utility will skip renaming files or directories that are already +# in lowercase. +# - Invalid or non-existent paths will result in an error message. +# +################################################################################ -# lowercase: Function to move filenames or directory names to lowercase lowercase() { - if [[ "$#" != 1 ]]; then - echo "[ERROR] The filename or directory name is incorrect." >&2 + # Ensure at least one argument is provided + if [[ "$#" -lt 1 ]]; then + echo "[ERROR] Please provide at least one file or directory to convert to lowercase." >&2 return 1 fi - for file; do - filename=${file##*/} - case "${filename}" in - */*) [[ "dirname" = "${file%/*}" ]] ;; - *) dirname=. ;; - esac - nf=$(echo "${filename}" | tr '[:upper:]' '[:lower:]') + + for file in "$@"; do + # Check if the file/directory exists + if [[ ! -e "$file" ]]; then + echo "[ERROR] The file or directory '$file' does not exist." >&2 + continue + fi + + dirname=$(dirname "$file") + filename=$(basename "$file") + + # Convert filename to lowercase using tr + nf=$(printf "%s" "$filename" | tr '[:upper:]' '[:lower:]') + + # If already lowercase, skip + if [[ "$filename" == "$nf" ]]; then + echo "[INFO] '$file' is already in lowercase." + continue + fi + newname="${dirname}/${nf}" - if [[ "${nf}" != "${filename}" ]]; then - mv "${file}" "${newname}" - echo "[INFO] Renaming ${file} to lowercase: ${newname}" + + if mv "$file" "$newname"; then + echo "[INFO] Renamed '$file' to '$newname'." else - echo "[ERROR] The operation is not valid, ${file} has not changed." + echo "[ERROR] Failed to rename '$file'." >&2 fi done } diff --git a/lib/functions/matrix.sh b/lib/functions/matrix.sh index af4c23b8..32193692 100644 --- a/lib/functions/matrix.sh +++ b/lib/functions/matrix.sh @@ -1,41 +1,216 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Matrix Effect Generator (matrix) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# matrix is a utility function to generate Matrix-style effects in the terminal +# with customizable colors. It supports multiple color themes and a rainbow +# effect option. +# +################################################################################ -# matrix: Function to Enable Matrix Effect in the terminal -matrix() { - printf '\e[1;40m' +# Define colors +MATRIX_GREEN='\033[38;5;46m' # Green (#00FF00) +MATRIX_PURPLE='\033[38;5;55m' # Purple (#2D1681) +MATRIX_RED='\033[38;5;196m' # Red (#EB0000) +MATRIX_BLUE='\033[38;5;33m' # Blue (#007ACC) +MATRIX_WHITE='\033[38;5;15m' # White (#FFFFFF) +MATRIX_YELLOW='\033[38;5;226m' # Yellow +RESET_COLOR='\033[0m' + +VERSION="1.0.0" + +# Logging functions +log_info() { + echo "[INFO] $*" +} + +log_warning() { + echo "[WARNING] $*" >&2 +} + +log_error() { + echo "[ERROR] $*" >&2 + exit 1 +} + +show_help() { + cat << 'EOH' +πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Matrix Effect Generator (matrix) + +Description: + Generate Matrix-style effects in the terminal with customizable colors. + Supports multiple color themes and a rainbow effect option. + +Usage: + matrix [options] + matrix --help + +Options: + --color Select color theme: + green - Classic green (default) + purple - Purple (#2D1681) + red - Red (#EB0000) + blue - Blue (#007ACC) + white - White (#FFFFFF) + yellow - Yellow + --rainbow Enable rainbow color effect + --slow Reduce animation speed + --fast Increase animation speed + --help Display this help menu and exit + --version Display version information and exit + +Examples: + matrix + # Classic green Matrix effect + + matrix --color purple + # Purple Matrix effect + + matrix --rainbow + # Rainbow color effect + + matrix --color blue --slow + # Slow blue Matrix effect + +Notes: + - Press Ctrl+C to exit + - Animation speed can be adjusted with --slow or --fast + - Terminal size is automatically detected + - Minimum terminal size required: 20x10 + - Colors can be customized by modifying the color variables +EOH +} + +show_version() { + echo "Matrix Effect Generator v${VERSION}" +} + +cleanup() { + printf '\e[?25h' # Show cursor + tput rmcup # Restore screen + tput cnorm # Show cursor clear - while : || true; do - echo "${LINES} ${COLUMNS} $((RANDOM % COLUMNS)) $((RANDOM % 72))" - sleep 0.05 || true - done | awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' + exit 0 } -# matrix: Function to Enable Matrix Effect in the terminal in color -matrix_color() { +matrix() { + # Check for help and version flags before parsing options + if [[ "$1" == "--help" ]]; then + show_help + return 0 + elif [[ "$1" == "--version" ]]; then + show_version + return 0 + fi + + # Check terminal size + if [[ "${LINES:-0}" -lt 10 || "${COLUMNS:-0}" -lt 20 ]]; then + log_error "Terminal window too small. Minimum size: 20x10" + fi + + # Default settings + local color="$MATRIX_GREEN" + local speed=0.05 + local rainbow=false + + # Parse options + while [[ $# -gt 0 ]]; do + case "$1" in + --color) + case "$2" in + green) color="$MATRIX_GREEN" ;; + purple) color="$MATRIX_PURPLE" ;; + red) color="$MATRIX_RED" ;; + blue) color="$MATRIX_BLUE" ;; + white) color="$MATRIX_WHITE" ;; + yellow) color="$MATRIX_YELLOW" ;; + *) log_error "Invalid color: '$2'. Use 'matrix --help' for available colors." ;; + esac + shift 2 + ;; + --rainbow) + rainbow=true + shift + ;; + --slow) + speed=0.1 + shift + ;; + --fast) + speed=0.02 + shift + ;; + --help) + show_help + return 0 + ;; + --version) + show_version + return 0 + ;; + *) + log_error "Unknown option: '$1'. Use 'matrix --help' for usage information." + ;; + esac + done + + # Save screen state and hide cursor + tput smcup + printf '\e[?25l' printf '\e[1;40m' clear - while : || true; do - echo "${LINES} ${COLUMNS} $((RANDOM % COLUMNS)) $((RANDOM % 72))" - sleep 0.05 || true - done | awk '{ - letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; - c=$4; - letter=substr(letters,c,1); - a[$3]=0; - for (x in a) { - o=a[x]; - a[x]=a[x]+1; - color="\033[38;5;" int(rand()*255) "m"; - printf "\033[%s;%sH%s%s",o,x,color,letter; - printf "\033[%s;%sH\033[0m%s\033[0;0H",a[x],x,letter; - if (a[x] >= $1) { - a[x]=0; + + # Trap cleanup for exit signals + trap cleanup INT TERM EXIT + + if $rainbow; then + # Rainbow effect + while true; do + echo "${LINES:-40} ${COLUMNS:-80} $((RANDOM % COLUMNS)) $((RANDOM % 72))" + sleep "$speed" + done | awk -v reset="$RESET_COLOR" ' + { + letters="ζ—₯οΎŠοΎοΎ‹ο½°ο½³ο½ΌοΎ…οΎοΎ†ο½»οΎœοΎ‚ο½΅οΎ˜ο½±οΎŽοΎƒοΎο½ΉοΎ’ο½΄ο½Άο½·οΎ‘οΎ•οΎ—ο½ΎοΎˆο½½οΎ€οΎ‡οΎ"; + c=$4; + if (c <= 0 || c > length(letters)) next; + letter=substr(letters, c, 1); + a[$3] = 0; + for (x in a) { + o = a[x]; + a[x] = a[x] + 1; + random_color = "\033[38;5;" int(rand() * 255) "m"; + if (o > 0 && x > 0) { + printf "\033[%s;%sH%s%s%s", o, x, random_color, letter, reset; + printf "\033[%s;%sH%s%s%s", a[x], x, reset, letter, reset; + } + if (a[x] >= $1) a[x] = 0; + } + }' + else + # Single color effect + while true; do + echo "${LINES:-40} ${COLUMNS:-80} $((RANDOM % COLUMNS)) $((RANDOM % 72))" + sleep "$speed" + done | awk -v color="$color" -v reset="$RESET_COLOR" ' + { + letters="ζ—₯οΎŠοΎοΎ‹ο½°ο½³ο½ΌοΎ…οΎοΎ†ο½»οΎœοΎ‚ο½΅οΎ˜ο½±οΎŽοΎƒοΎο½ΉοΎ’ο½΄ο½Άο½·οΎ‘οΎ•οΎ—ο½ΎοΎˆο½½οΎ€οΎ‡οΎ"; + c=$4; + if (c <= 0 || c > length(letters)) next; + letter=substr(letters, c, 1); + a[$3] = 0; + for (x in a) { + o = a[x]; + a[x] = a[x] + 1; + if (o > 0 && x > 0) { + printf "\033[%s;%sH%s%s%s", o, x, color, letter, reset; + printf "\033[%s;%sH%s%s%s", a[x], x, reset, letter, reset; + } + if (a[x] >= $1) a[x] = 0; } - } - }' + }' + fi } diff --git a/lib/functions/ren.sh b/lib/functions/ren.sh index d5dfba8a..5a03e196 100644 --- a/lib/functions/ren.sh +++ b/lib/functions/ren.sh @@ -1,13 +1,73 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - File Extension Renamer (ren) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# ren is a utility function to rename file extensions in the current directory. +# It supports batch renaming with confirmation. +# +# Usage: +# ren OLD_EXT NEW_EXT +# +# Example: +# ren txt md # Rename all .txt files to .md +# +################################################################################ -# ren: Function to rename files extension. ren() { - for f in *."$1"; do - mv "${f}" "${f%."$1"}.$2" - done -} + # Check if we have both arguments + if [[ $# -ne 2 ]]; then + echo "[ERROR] Usage: ren OLD_EXT NEW_EXT" >&2 + return 1 + fi + + local old_ext="$1" + local new_ext="$2" + local count=0 + + # First check if any matching files exist + for file in *."$old_ext"; do + # Skip if no matches found + [[ -e "$file" ]] || { + echo "[WARNING] No files found with extension .$old_ext" + return 0 + } + ((count++)) + break + done + + # Show what we're about to do + echo "[INFO] Found files with .$old_ext extension. Converting to .$new_ext" + echo "[INFO] The following files will be renamed:" + for file in *."$old_ext"; do + echo " $file β†’ ${file%."$old_ext"}.$new_ext" + done + + # Ask for confirmation + echo -n "Proceed with rename? [y/N] " + read -r response + if [[ ! "${response}" =~ ^[Yy]$ ]]; then + echo "[INFO] Operation cancelled" + return 0 + fi + + # Perform the rename + local success=0 + local failed=0 + for file in *."$old_ext"; do + if mv "$file" "${file%."$old_ext"}.$new_ext"; then + echo "[SUCCESS] Renamed: $file β†’ ${file%."$old_ext"}.$new_ext" + ((success++)) + else + echo "[ERROR] Failed to rename: $file" >&2 + ((failed++)) + fi + done + + # Show summary + echo "----------------------------------------" + echo "[COMPLETE] Successfully renamed: $success, Failed: $failed" +} \ No newline at end of file diff --git a/lib/functions/sentencecase.sh b/lib/functions/sentencecase.sh new file mode 100644 index 00000000..9662bea8 --- /dev/null +++ b/lib/functions/sentencecase.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform Sentencecase Utility (sentencecase) +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# Description: +# sentencecase converts file or directory names to sentence case. It capitalizes +# the first character of the first word, while the rest of the characters are +# lowercased. This is different from title case, as only the very first letter +# is capitalized. +# +# Usage: +# sentencecase [ ...] +# +# Arguments: +# One or more file or directory paths to rename +# to sentence case. +# +# Notes: +# - Already sentence case files are skipped. +# - Non-existent paths will produce an error message. +# - Complex scenarios (multiple words, punctuation) are handled by simply +# making all letters lowercase except the first character. +# +################################################################################ + +sentencecase() { + if [[ "$#" -lt 1 ]]; then + echo "[ERROR] Please provide at least one file or directory to convert to sentence case." >&2 + return 1 + fi + + for file in "$@"; do + if [[ ! -e "$file" ]]; then + echo "[ERROR] The file or directory '$file' does not exist." >&2 + continue + fi + + dirname=$(dirname "$file") + filename=$(basename "$file") + + # Convert filename to lowercase + lc_filename=$(printf "%s" "$filename" | tr '[:upper:]' '[:lower:]') + + # Capitalize only the first character + sc_filename="$(printf "%s" "${lc_filename:0:1}" | tr '[:lower:]' '[:upper:]')${lc_filename:1}" + + # If already sentence case, skip + if [[ "$filename" == "$sc_filename" ]]; then + echo "[INFO] '$file' is already in sentence case." + continue + fi + + newname="${dirname}/${sc_filename}" + if mv "$file" "$newname"; then + echo "[INFO] Renamed '$file' to '$newname'." + else + echo "[ERROR] Failed to rename '$file'." >&2 + fi + done +} diff --git a/lib/functions/size.sh b/lib/functions/size.sh index ad316a7b..4158a354 100644 --- a/lib/functions/size.sh +++ b/lib/functions/size.sh @@ -1,15 +1,16 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - size +# Made with β™₯ by Sebastien Rousseau # Copyright (c) 2015-2025. All rights reserved # License: MIT # size: Function to check a file size size() { if [[ "$#" != 1 ]]; then - echo "[ERROR] Please add one argument" >&2 + echo "[ERROR] Please add one argument (file or directory)" >&2 return 1 fi - stat -f '[INFO] The file total size, in bytes is %z' "$1" + + stat -f '[INFO] Directory total size: %z bytes' "$1" } diff --git a/lib/functions/snakecase.sh b/lib/functions/snakecase.sh new file mode 100644 index 00000000..31d95797 --- /dev/null +++ b/lib/functions/snakecase.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform Snakecase Utility (snakecase) +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# Description: +# snakecase converts file or directory names to snake_case. All letters +# are lowercase and spaces or other non-alphanumeric characters are replaced +# by underscores. +# +# Usage: +# snakecase [ ...] +# +# Arguments: +# One or more file or directory paths to rename +# to snake_case. +# +# Notes: +# - Already snake_case files are skipped. +# - Non-existent paths will produce an error message. +# - Special characters (other than alphanumeric and '.') are replaced +# with underscores. +# +################################################################################ + +snakecase() { + if [[ "$#" -lt 1 ]]; then + echo "[ERROR] Please provide at least one file or directory to convert to snake_case." >&2 + return 1 + fi + + for file in "$@"; do + if [[ ! -e "$file" ]]; then + echo "[ERROR] The file or directory '$file' does not exist." >&2 + continue + fi + + dirname=$(dirname "$file") + filename=$(basename "$file") + + # Convert to lowercase and replace non-alphanumeric chars (except '.') with underscores + sc_filename=$(printf "%s" "$filename" \ + | tr '[:upper:]' '[:lower:]' \ + | sed 's/[^[:alnum:].]/_/g') + + # If already snake_case, skip + if [[ "$filename" == "$sc_filename" ]]; then + echo "[INFO] '$file' is already in snake_case." + continue + fi + + newname="${dirname}/${sc_filename}" + if mv "$file" "$newname"; then + echo "[INFO] Renamed '$file' to '$newname'." + else + echo "[ERROR] Failed to rename '$file'." >&2 + fi + done +} diff --git a/lib/functions/sysinfo.sh b/lib/functions/sysinfo.sh new file mode 100644 index 00000000..d0698a6e --- /dev/null +++ b/lib/functions/sysinfo.sh @@ -0,0 +1,145 @@ +#!/usr/bin/env bash +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - sysinfo +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# sysinfo - A minimal system information script with emoji OS icons. +# +# This script displays basic system information in a style similar to neofetch, +# but simpler. It attempts to detect OS, CPU, GPU, memory, etc. +# +# Usage: +# sysinfo +# +################################################################################ + +#-------------------------------# +# Color Variables # +#-------------------------------# +GREEN='\033[0;32m' +RESET='\033[0m' + +####################################### +# Detect platform and choose an emoji. +####################################### +case "$(uname -s)" in + Darwin) + emoji="🍎" + ;; + Linux) + emoji="🐧" + ;; + CYGWIN*|MINGW*|MSYS*) + emoji="πŸͺŸ" + ;; + *) + emoji="πŸ–₯" + ;; +esac + +hostname=$(hostname) + +####################################### +# Collect system information depending on OS. +####################################### +if [[ "$(uname -s)" = "Darwin" ]]; then + hw_info=$(system_profiler SPHardwareDataType) + disp_info=$(system_profiler SPDisplaysDataType) + + model_name=$(echo "${hw_info}" | awk -F': ' '/Model Name/{print $2}') + model_id=$(echo "${hw_info}" | awk -F': ' '/Model Identifier/{print $2}') + chip=$(echo "${hw_info}" | awk -F': ' '/Chip/{print $2}') + total_cores=$(echo "${hw_info}" | awk -F': ' '/Total Number of Cores/{print $2}') + mem=$(echo "${hw_info}" | awk -F': ' '/Memory/{print $2}') + + os="macOS $(sw_vers -productVersion)" + kernel=$(uname -r) + uptime=$(uptime | sed 's/.*up //' | sed 's/, .*//') + cpu="$chip ($total_cores cores)" + gpu=$(echo "${disp_info}" | awk -F': ' '/Chipset Model/ {print $2; exit}') + resolution=$(echo "${disp_info}" | awk -F': ' '/Resolution/{print $2}' | head -n1) + shell=$(basename "${SHELL}") + + terminal=${TERM_PROGRAM:-"${TERM}"} + memory="${mem}" + +elif [[ "$(uname -s)" = "Linux" ]]; then + # OS + if [ -f /etc/os-release ]; then + os=$(awk -F= '/^PRETTY_NAME/{print $2}' /etc/os-release 2>/dev/null | tr -d \") + else + os=$(uname -s) + fi + + kernel=$(uname -r) + uptime=$(uptime -p | sed 's/up //') + shell=$(basename "${SHELL}") + terminal=${TERM:-"Unknown"} + + # CPU (check if lscpu is available) + if command -v lscpu >/dev/null 2>&1; then + cpu=$(lscpu 2>/dev/null | awk -F': +' '/Model name/ {print $2; exit}') + else + cpu="Unknown CPU" + fi + + # GPU (check if lspci is available) + if command -v lspci >/dev/null 2>&1; then + gpu=$(lspci 2>/dev/null | grep -E "VGA|3D" | sed -E "s/.*: (.*)/\1/" | head -n1) + else + gpu="Unknown GPU" + fi + + # Memory + mem_total_kb=$(grep MemTotal /proc/meminfo 2>/dev/null | awk '{print $2}') + if [ -n "${mem_total_kb:-}" ]; then + memory=$(awk "BEGIN {printf \"%.1fGiB\",$mem_total_kb/1024/1024}") + else + memory="Unknown" + fi + + # Resolution (check if xrandr is available) + if command -v xrandr >/dev/null 2>&1; then + resolution=$(xrandr --current 2>/dev/null | awk '/\*/{print $1; exit}') + else + resolution="Unknown" + fi + + model_name="" + model_id="" + +else + # Fallback + os=$(uname -s) + kernel=$(uname -r) + uptime="Unknown" + cpu="Unknown" + gpu="Unknown" + shell=$(basename "${SHELL}") + terminal=${TERM:-"Unknown"} + memory="Unknown" + resolution="Unknown" + model_name="" + model_id="" +fi + +####################################### +# Print system information. +####################################### +sysinfo() { + printf "%s %s\n" "${emoji}" "${hostname}" + echo "------------------" + echo "${GREEN}OS:${RESET} ${os}" + echo "${GREEN}Kernel:${RESET} ${kernel}" + echo "${GREEN}Uptime:${RESET} ${uptime}" + echo "${GREEN}CPU:${RESET} ${cpu}" + echo "${GREEN}GPU:${RESET} ${gpu}" + echo "${GREEN}Memory:${RESET} ${memory}" + echo "${GREEN}Shell:${RESET} ${shell}" + echo "${GREEN}Terminal:${RESET} ${terminal}" + echo "${GREEN}Resolution:${RESET} ${resolution}" + if [[ -n "${model_name}" ]] && [[ -n "${model_id}" ]]; then + echo "Model: ${model_name} (${model_id})" + fi +} \ No newline at end of file diff --git a/lib/functions/titlecase.sh b/lib/functions/titlecase.sh new file mode 100644 index 00000000..b2e174f1 --- /dev/null +++ b/lib/functions/titlecase.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform Titlecase Utility (titlecase) +# Made with β™₯ by Sebastien Rousseau +# License: MIT +# +# Description: +# titlecase is a utility function that converts file or directory names to +# title case. It capitalizes the first character and lowercases all subsequent +# characters, resulting in a format similar to "Myfile.txt". +# +# Usage: +# titlecase [ ...] +# +# Arguments: +# One or more file or directory paths to rename +# to title case. +# +# Notes: +# - This utility will skip renaming files or directories that are already +# in title case. +# - Invalid or non-existent paths will result in an error message. +# - If you need more complex title casing (e.g., handling underscores or +# multiple words), you may need to adjust the logic. +# +################################################################################ + +titlecase() { + # Ensure at least one argument is provided + if [[ "$#" -lt 1 ]]; then + echo "[ERROR] Please provide at least one file or directory to convert to title case." >&2 + return 1 + fi + + for file in "$@"; do + # Check if the file/directory exists + if [[ ! -e "${file}" ]]; then + echo "[ERROR] The file or directory '${file}' does not exist." >&2 + continue + fi + + dirname=$(dirname "${file}") + filename=$(basename "${file}") + + # Convert the entire filename to lowercase + lc_filename=$(printf "%s" "${filename}" | tr '[:upper:]' '[:lower:]') + # Capitalize the first letter + tc_filename="$(printf "%s" "${lc_filename:0:1}" | tr '[:lower:]' '[:upper:]')${lc_filename:1}" + + # If already in title case, skip + if [[ "${filename}" == "${tc_filename}" ]]; then + echo "[INFO] '${file}' is already in title case." + continue + fi + + newname="${dirname}/${tc_filename}" + + if mv "${file}" "${newname}"; then + echo "[INFO] Renamed '${file}' to '${newname}'." + else + echo "[ERROR] Failed to rename '${file}'." >&2 + fi + done +} diff --git a/lib/functions/uppercase.sh b/lib/functions/uppercase.sh index f3e75fbc..f2c3acbe 100644 --- a/lib/functions/uppercase.sh +++ b/lib/functions/uppercase.sh @@ -1,29 +1,61 @@ #!/usr/bin/env bash -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved +################################################################################ +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ - Cross-Platform Uppercase Utility (uppercase) +# Made with β™₯ by Sebastien Rousseau # License: MIT +# +# Description: +# uppercase is a utility function that converts file or directory names to +# uppercase. It supports multiple arguments and provides informative messages +# for each operation, including errors and successful renames. +# +# Usage: +# uppercase [ ...] +# +# Arguments: +# One or more file or directory paths to rename +# to uppercase. +# +# Notes: +# - This utility will skip renaming files or directories that are already +# in uppercase. +# - Invalid or non-existent paths will result in an error message. +# +################################################################################ -# uppercase: Function to move filenames or directory names to uppercase uppercase() { - if [[ "$#" != 1 ]]; then - echo "[ERROR] The filename or directory name is incorrect." >&2 + # Ensure at least one argument is provided + if [[ "$#" -lt 1 ]]; then + echo "[ERROR] Please provide at least one file or directory to convert to uppercase." >&2 return 1 fi - for file; do - filename=${file##*/} - case "${filename}" in - */*) dirname=${file%/*} ;; - *) dirname=. ;; - esac - nf=$(echo "${filename}" | tr '[:upper:]' '[:lower:]') - newname="${dirname}/${nf}" - if [[ "${nf}" != "${filename}" ]]; then - mv "${file}" "${newname}" - echo "[INFO] Renaming ${file} to uppercase: ${newname}" + + for file in "$@"; do + # Check if the file/directory exists + if [[ ! -e "${file}" ]]; then + echo "[ERROR] The file or directory '${file}' does not exist." >&2 + continue + fi + + dirname=$(dirname "${file}") + filename=$(basename "${file}") + + # Convert filename to uppercase using tr + uf=$(printf "%s" "${filename}" | tr '[:lower:]' '[:upper:]') + + # If already uppercase, skip + if [[ "${filename}" == "${uf}" ]]; then + echo "[INFO] '${file}' is already in uppercase." + continue + fi + + newname="${dirname}/${uf}" + + if mv "${file}" "${newname}"; then + echo "[INFO] Renamed '${file}' to '${newname}'." else - echo "[ERROR] The operation is not valid, ${file} has not changed." + echo "[ERROR] Failed to rename '${file}'." >&2 fi done -} +} \ No newline at end of file diff --git a/lib/paths.sh b/lib/paths.sh index e611af92..e1ac034f 100644 --- a/lib/paths.sh +++ b/lib/paths.sh @@ -11,11 +11,10 @@ # License: MIT ################################################################################ -## πŸ…²πŸ…ΎπŸ…½πŸ…΅πŸ…ΈπŸ…ΆπŸ†„πŸ†πŸ…°πŸ†ƒπŸ…ΈπŸ…ΎπŸ…½πŸ†‚ -# Function: load_custom_configurations +# Function: load_paths # # Description: -# Loads custom shell configurations from the specified directory. +# Loads all the paths from the specified directory. # # Arguments: # None @@ -23,11 +22,11 @@ # Further Reading: # ShellCheck Documentation: https://github.com/koalaman/shellcheck -load_custom_configurations() { - for config in "${HOME}"/.dotfiles/lib/configurations/[!.#]*/*.sh; do +load_paths() { + for path in "${HOME}"/.dotfiles/lib/paths/[!.#]*/*.sh; do # shellcheck source=/dev/null - source "${config}" + source "${path}" done } -load_custom_configurations +load_paths diff --git a/lib/paths/ant/ant.paths.sh b/lib/paths/ant/ant.paths.sh deleted file mode 100644 index 5a35d1bc..00000000 --- a/lib/paths/ant/ant.paths.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# License: MIT - -## πŸ…°πŸ…½πŸ†ƒ πŸ…·πŸ…ΎπŸ…ΌπŸ…΄ -if [[ "${OSTYPE}" == "darwin"* ]]; then - ANT_HOME="/opt/homebrew/Cellar/ant/" -elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - ANT_HOME="/usr/share/ant/" -fi -export ANT_HOME -export PATH="${ANT_HOME}/bin:${PATH}" diff --git a/lib/paths/default/custom.paths.sh b/lib/paths/default/custom.paths.sh new file mode 100644 index 00000000..968a3bca --- /dev/null +++ b/lib/paths/default/custom.paths.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - +# Made with β™₯ in London, UK by Sebastien Rousseau +# Copyright (c) 2015-2025. All rights reserved +# License: MIT + +## πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ + +# System paths +# Adding essential system directories to PATH +export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:${PATH}" + +# Frameworks and Applications +# Add Apple binaries and TeX Live to PATH +export PATH="/Library/Apple/usr/bin:/Library/TeX/texbin:${PATH}" + +# Add Cargo binaries to PATH (check version with: cargo --version) +export PATH="${HOME}/.cargo/bin:${PATH}" + +# Add Go binaries to PATH (check version with: go version) +export PATH="${HOME}/go/bin:${PATH}" + +# Add Node.js global modules binaries to PATH (check version with: node --version) +export PATH="${HOME}/.node_modules/bin:${PATH}" + +# Application-specific paths +export PATH="/Applications/Topaz\ Photo\ AI.app/Contents/Resources/bin:/Applications/Little\ Snitch.app/Contents/Components:/Applications/iTerm.app/Contents/Resources/utilities:${PATH}" + +# Deduplicate PATH entries +deduplicate_path() { + PATH=$(echo "$PATH" | awk -v RS=':' '!seen[$0]++ {ORS=(NR>1?":":"")} {print}') + export PATH +} + +# Call the deduplication function +PATH=$(echo "$PATH" | awk -v RS=':' '!seen[$0]++ {ORS=(NR>1?":":"")} {print}') +export PATH + +deduplicate_path diff --git a/lib/paths/default/default.paths.sh b/lib/paths/default/default.paths.sh index 3ff1fdbd..9a604604 100644 --- a/lib/paths/default/default.paths.sh +++ b/lib/paths/default/default.paths.sh @@ -8,12 +8,30 @@ ## πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ ### Add 'PATH' entries. -export PATH=/usr/local/bin:"${PATH}" # Add /usr/local/bin to the path -export PATH=/usr/local/sbin:"${PATH}" # Add /usr/local/sbin to the path -export PATH=/usr/bin:"${PATH}" # Add /usr/bin to the path -export PATH=/bin:"${PATH}" # Add /bin to the path -export PATH=/usr/sbin:"${PATH}" # Add /usr/sbin to the path -export PATH=/sbin:"${PATH}" # Add /sbin to the path -export PATH="${HOME}"/.cargo/bin:"${PATH}" # Add ~/.cargo/bin to the path -export PATH="${HOME}"/.yarn/bin:"${PATH}" # Add ~/.yarn/bin to the path -export PATH="${HOME}"/go/bin:"${PATH}" # Add ~/go/bin to the path + +# System paths +export PATH=/usr/local/bin:"${PATH}" +export PATH=/usr/local/sbin:"${PATH}" +export PATH=/usr/bin:"${PATH}" +export PATH=/bin:"${PATH}" +export PATH=/sbin:"${PATH}" + +# Homebrew paths +export PATH=/opt/homebrew/bin:"${PATH}" +export PATH=/opt/homebrew/sbin:"${PATH}" + +# Ruby paths + +# Add Ruby homebrew binaries to PATH (check version with: ruby --version) +if command -v /opt/homebrew/opt/ruby/bin/ruby >/dev/null; then + export PATH="/opt/homebrew/opt/ruby/bin/:${PATH}" +elif command -v /usr/bin/ruby >/dev/null; then + export PATH="/usr/bin/:${PATH}" +fi + +# Add Ruby gem binaries to PATH (check version with: gem --version) +export PATH="${HOME}/.gem/ruby/bin:${PATH}" + + + + diff --git a/lib/paths/homebrew/homebrew.paths.sh b/lib/paths/homebrew/homebrew.paths.sh deleted file mode 100644 index f16367a9..00000000 --- a/lib/paths/homebrew/homebrew.paths.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env bash - -################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Script: homebrew.paths.sh -# Version: 0.2.469 -# Author: Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# Description: Configure Homebrew environment paths and options -# Website: https://dotfiles.io -# License: MIT -################################################################################ - -#----------------------------------------------------------------------------- -# Function: configure_homebrew_paths -# -# Description: -# Configures Homebrew-related paths and environment variables. -# Only runs on macOS systems. -# -# Arguments: -# None -# -# Returns: -# 0 on success, 1 if not on macOS or Homebrew not found -#----------------------------------------------------------------------------- -configure_homebrew_paths() { - # Check if running on macOS - if [[ "${OSTYPE}" != "darwin"* ]]; then - echo "Warning: Homebrew configuration is only for macOS systems" >&2 - return 1 - fi # Fixed: Added missing 'fi' - - # Check if Homebrew is installed - if ! command -v brew >/dev/null; then - echo "Warning: Homebrew is not installed" >&2 - return 1 - fi - - # Base Homebrew paths - local homebrew_prefix="/opt/homebrew" - - # Verify Homebrew directories exist - if [[ ! -d "${homebrew_prefix}" ]]; then - echo "Warning: Homebrew prefix directory not found: ${homebrew_prefix}" >&2 - return 1 - fi - - # Configure PATH entries - local paths=( - "${homebrew_prefix}/bin" # Homebrew binaries - "${homebrew_prefix}/sbin" # Homebrew system binaries - "${homebrew_prefix}/bin/bash" # Homebrew bash - ) - - # Add paths to PATH if they exist - for path in "${paths[@]}"; do - if [[ -d "${path}" ]]; then - PATH="${path}:${PATH}" - else - echo "Warning: Homebrew path not found: ${path}" >&2 - fi - done - - export PATH - return 0 -} - -#----------------------------------------------------------------------------- -# Function: configure_homebrew_options -# -# Description: -# Configures Homebrew behavior and preferences. -# -# Arguments: -# None -# -# Returns: -# None -#----------------------------------------------------------------------------- -configure_homebrew_options() { - # Disable Homebrew analytics - # See: https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md - export HOMEBREW_NO_ANALYTICS=1 - - # Set auto-update frequency (seconds) - # Default: Update once per day (86400 seconds) - export HOMEBREW_AUTO_UPDATE_SECS=86400 - - # Configure Homebrew Cask options - export HOMEBREW_CASK_OPTS="--appdir=/Applications" - - # Additional Homebrew preferences - export HOMEBREW_NO_ENV_HINTS=1 # Disable environment hints - export HOMEBREW_BAT=1 # Use bat for JSON output - export HOMEBREW_DISPLAY_INSTALL_TIMES=1 # Show install times - export HOMEBREW_NO_INSECURE_REDIRECT=1 # Prevent insecure redirects - export HOMEBREW_NO_AUTO_UPDATE=1 # Disable auto updates -} - -#----------------------------------------------------------------------------- -# Main Execution -#----------------------------------------------------------------------------- - -# Configure Homebrew paths -configure_homebrew_paths - -# Configure Homebrew options -configure_homebrew_options diff --git a/lib/paths/java/java.paths.sh b/lib/paths/java/java.paths.sh deleted file mode 100644 index da8c6e73..00000000 --- a/lib/paths/java/java.paths.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env bash - -################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Script: java.paths.sh -# Version: 0.2.469 -# Author: Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# Description: Configure Java environment paths and options -# Website: https://dotfiles.io -# License: MIT -################################################################################ - -# Java version configuration -JAVA_VERSION="23.0.1" -JAVA_MAJOR_VERSION="23" - -#----------------------------------------------------------------------------- -# Function: configure_java_paths -# -# Description: -# Configures Java-related paths based on the operating system. -# Supports both macOS (Homebrew) and Linux environments. -# -# Arguments: -# None -# -# Returns: -# 0 on success, 1 on failure -#----------------------------------------------------------------------------- -configure_java_paths() { - # macOS specific configuration - if [[ "${OSTYPE}" == "darwin"* ]]; then - local java_brew_path="/opt/homebrew/Cellar/openjdk/${JAVA_VERSION}/libexec/openjdk.jdk/Contents/Home" - local java_include_path="/opt/homebrew/opt/openjdk/include" - - if [[ -d "${java_brew_path}" ]]; then - export JAVA_HOME="${java_brew_path}" - export PATH="/opt/homebrew/opt/openjdk/bin:${PATH}" - - # Set C/C++ flags for JNI development - if [[ -d "${java_include_path}" ]]; then - export CPPFLAGS="-I${java_include_path}" - else - echo "Warning: Java include path not found: ${java_include_path}" >&2 - fi - else - echo "Warning: Java not found in Homebrew path: ${java_brew_path}" >&2 - return 1 - fi - - # Linux specific configuration - elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - local java_path="/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-openjdk-arm64" - if [[ -d "${java_path}" ]]; then - export JAVA_HOME="${java_path}" - else - echo "Warning: Java not found at ${java_path}" >&2 - return 1 - fi - - else - echo "Warning: Unsupported operating system" >&2 - return 1 - fi - - # Verify Java installation - if command -v java >/dev/null; then - local installed_version - installed_version=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2) - if [[ "${installed_version}" != "${JAVA_VERSION}"* ]]; then - echo "Warning: Installed Java version (${installed_version}) differs from expected version (${JAVA_VERSION})" >&2 - fi - else - echo "Warning: Java command not found in PATH" >&2 - return 1 - fi - - return 0 -} - -#----------------------------------------------------------------------------- -# Function: configure_java_environment -# -# Description: -# Configures additional Java environment variables and options. -# -# Arguments: -# None -# -# Returns: -# None -#----------------------------------------------------------------------------- -configure_java_environment() { - # Set JRE_HOME if it exists - if [[ -d "${JAVA_HOME}/jre" ]]; then - export JRE_HOME="${JAVA_HOME}/jre" - fi - - # Additional Java environment variables - export _JAVA_OPTIONS="${_JAVA_OPTIONS:--Xms512m -Xmx2g}" - export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS:--Dfile.encoding=UTF8}" -} - -#----------------------------------------------------------------------------- -# Main Execution -#----------------------------------------------------------------------------- - -# Configure Java paths -configure_java_paths - -# Configure Java environment -configure_java_environment diff --git a/lib/paths/maven/maven.paths.sh b/lib/paths/maven/maven.paths.sh deleted file mode 100644 index 5a6665dc..00000000 --- a/lib/paths/maven/maven.paths.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env bash - -################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Script: maven.paths.sh -# Version: 0.2.469 -# Author: Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# Description: Configure Maven environment paths and options -# Website: https://dotfiles.io -# License: MIT -################################################################################ - -# Maven version configuration -MAVEN_VERSION="3.9.9" -MAVEN_MIN_MEMORY="1g" -MAVEN_MAX_MEMORY="1g" - -#----------------------------------------------------------------------------- -# Function: configure_maven_paths -# -# Description: -# Configures Maven-related paths based on the operating system. -# Supports both macOS (Homebrew) and Linux environments. -# -# Arguments: -# None -# -# Returns: -# 0 on success, 1 on failure -#----------------------------------------------------------------------------- -configure_maven_paths() { - # macOS specific configuration - if [[ "${OSTYPE}" == "darwin"* ]]; then - local maven_brew_path="/opt/homebrew/Cellar/maven/${MAVEN_VERSION}/libexec" - if [[ -d "${maven_brew_path}" ]]; then - export M2_HOME="${maven_brew_path}" - export MAVEN_HOME="${maven_brew_path}" - else - echo "Warning: Maven not found in Homebrew path: ${maven_brew_path}" >&2 - return 1 - fi - - # Linux specific configuration - elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - local maven_path="/usr/share/maven" - if [[ -d "${maven_path}" ]]; then - export MAVEN_HOME="${maven_path}" - else - echo "Warning: Maven not found at ${maven_path}" >&2 - return 1 - fi - - else - echo "Warning: Unsupported operating system" >&2 - return 1 - fi - - # Verify maven installation - if command -v mvn >/dev/null; then - local installed_version - installed_version=$(mvn --version | grep "Apache Maven" | awk '{print $3}') - if [[ "${installed_version}" != "${MAVEN_VERSION}" ]]; then - echo "Warning: Installed Maven version (${installed_version}) differs from expected version (${MAVEN_VERSION})" >&2 - fi - else - echo "Warning: Maven command not found in PATH" >&2 - return 1 - fi - - # Configure Maven paths - export PATH="${MAVEN_HOME}/bin:${PATH}" - - return 0 -} - -#----------------------------------------------------------------------------- -# Function: configure_maven_options -# -# Description: -# Configures Maven options including memory settings and other JVM options. -# -# Arguments: -# None -# -# Returns: -# None -#----------------------------------------------------------------------------- -configure_maven_options() { - # Set Maven memory options - export MAVEN_OPTS="-Xms${MAVEN_MIN_MEMORY} -Xmx${MAVEN_MAX_MEMORY}" - - # Additional Maven environment variables - export M2_REPO="${HOME}/.m2/repository" - export MAVEN_ARGS="${MAVEN_ARGS:---fail-fast}" -} - -#----------------------------------------------------------------------------- -# Main Execution -#----------------------------------------------------------------------------- - -# Configure Maven paths -configure_maven_paths - -# Configure Maven options -configure_maven_options diff --git a/lib/paths/node/node.paths.sh b/lib/paths/node/node.paths.sh deleted file mode 100644 index a5f0f6d9..00000000 --- a/lib/paths/node/node.paths.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash - -################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Script: node.paths.sh -# Version: 0.2.469 -# Author: Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# Description: Configure Node.js environment paths -# Website: https://dotfiles.io -# License: MIT -################################################################################ - -# Node.js version configuration -NODE_VERSION="23.4.0" -NODE_VERSION_NO_V="${NODE_VERSION#v}" # Remove 'v' prefix if present - -#----------------------------------------------------------------------------- -# Function: configure_node_paths -# -# Description: -# Configures Node.js-related paths based on the operating system. -# Supports both macOS (Homebrew) and Linux (NVM) environments. -# -# Arguments: -# None -# -# Returns: -# 0 on success, 1 on failure -#----------------------------------------------------------------------------- -configure_node_paths() { - # macOS specific configuration - if [[ "${OSTYPE}" == "darwin"* ]]; then - local node_brew_path="/opt/homebrew/Cellar/node/${NODE_VERSION_NO_V}" - if [[ -d "${node_brew_path}" ]]; then - NODE_PATH="${node_brew_path}" - else - echo "Warning: Node.js not found in Homebrew path: ${node_brew_path}" >&2 - return 1 - fi - - # Linux specific configuration - elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - local node_nvm_path="${HOME}/.nvm/versions/node/v${NODE_VERSION_NO_V}/bin/node" - if [[ -f "${node_nvm_path}" ]]; then - NODE_PATH="${node_nvm_path}" - else - echo "Warning: Node.js not found at ${node_nvm_path}" >&2 - return 1 - fi - - else - echo "Warning: Unsupported operating system" >&2 - return 1 - fi - - # Verify node installation - if command -v node >/dev/null; then - local installed_version - installed_version=$(node --version) - if [[ "${installed_version}" != "v${NODE_VERSION_NO_V}" ]]; then - echo "Warning: Installed Node.js version (${installed_version}) differs from expected version (v${NODE_VERSION_NO_V})" >&2 - fi - else - echo "Warning: Node.js command not found in PATH" >&2 - return 1 - fi - - # Export Node.js related variables - export NODE_PATH - export PATH="${NODE_PATH}:${PATH}" - - # Additional Node.js environment variables - export NODE_ENV="${NODE_ENV:-development}" # Set default environment - export NODE_OPTIONS="${NODE_OPTIONS:---max-old-space-size=4096}" # Set default memory limit - - return 0 -} - -#----------------------------------------------------------------------------- -# Main Execution -#----------------------------------------------------------------------------- - -# Configure Node.js paths -configure_node_paths diff --git a/lib/paths/nvm/nvm.paths.sh b/lib/paths/nvm/nvm.paths.sh deleted file mode 100644 index 7e807ece..00000000 --- a/lib/paths/nvm/nvm.paths.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# License: MIT - -## πŸ…½πŸ†…πŸ…Ό πŸ…ΏπŸ…°πŸ†ƒπŸ…· -if [[ "${OSTYPE}" == "darwin"* ]]; then - NVM_DIR="${HOME}"/.nvm - # shellcheck source=/dev/null - [[ -s "/opt/homebrew/opt/nvm/nvm.sh" ]] && . "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm - # shellcheck source=/dev/null - [[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ]] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion -elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - NVM_DIR="${HOME}"/.nvm - # shellcheck source=/dev/null - . "${NVM_DIR}/nvm.sh" # This loads nvm - # shellcheck source=/dev/null - . "${NVM_DIR}/bash_completion" # This loads nvm bash_completion -fi -export NVM_DIR -export PATH="${NVM_DIR}:${PATH}" diff --git a/lib/paths/pnpm/pnpm.paths.sh b/lib/paths/pnpm/pnpm.paths.sh deleted file mode 100644 index ab64f60b..00000000 --- a/lib/paths/pnpm/pnpm.paths.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# License: MIT - -## πŸ…ΏπŸ…½πŸ…ΏπŸ…Ό πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ -if [[ "${OSTYPE}" == "darwin"* ]]; then - PNPM_HOME=/opt/homebrew/Cellar/pnpm -elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - PNPM_HOME="${HOME}"/.local/share/pnpm -fi -export PNPM_HOME="${PNPM_HOME}" -export PATH="${PNPM_HOME}:${PATH}" diff --git a/lib/paths/python/python.paths.sh b/lib/paths/python/python.paths.sh deleted file mode 100644 index f27fa37a..00000000 --- a/lib/paths/python/python.paths.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env bash - -################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Script: python.paths.sh -# Version: 0.2.469 -# Author: Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# Description: Configure Python environment variables, paths and aliases -# Website: https://dotfiles.io -# License: MIT -################################################################################ - -# Python version configuration -PYTHON_VERSION="3.13.1" -PYTHON_MAJOR="3" - -#----------------------------------------------------------------------------- -# Function: configure_python_paths -# -# Description: -# Configures Python-related paths and environment variables based on the -# operating system. Supports both macOS and Linux environments. -# -# Arguments: -# None -# -# Returns: -# 0 on success, 1 on failure -# -# Usage: -# configure_python_paths -#----------------------------------------------------------------------------- -configure_python_paths() { - # macOS specific configuration - if [[ "${OSTYPE}" == "darwin"* ]]; then - local python_framework="/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}" - if [[ -d "${python_framework}/bin" ]]; then - export PATH="${python_framework}/bin:${PATH}" - export PYTHONHOME="${python_framework}" - else - echo "Warning: Python framework not found at ${python_framework}" >&2 - return 1 - fi - - # Linux specific configuration - elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - local python_path="/usr/bin/python${PYTHON_VERSION}" - if [[ -d "${python_path}" ]]; then - export PATH="/usr/bin:${PATH}" - export PYTHONHOME="/usr" - else - echo "Warning: Python not found at ${python_path}" >&2 - return 1 - fi - fi - - return 0 -} - -#----------------------------------------------------------------------------- -# Function: configure_python_environment -# -# Description: -# Sets up Python environment variables for optimal operation and compatibility. -# -# Arguments: -# None -# -# Returns: -# None -#----------------------------------------------------------------------------- -configure_python_environment() { - # Character encoding configuration - export PYTHONIOENCODING='UTF-8' # Encoding used for stdin/stdout/stderr - export PYTHONUTF8=1 # Enable UTF-8 mode - - # Development environment optimization - export PYTHONDONTWRITEBYTECODE=1 # Prevent creation of .pyc files - export PYTHONUNBUFFERED=1 # Force buffering of stdout/stderr - - # Custom startup configuration - if [[ -f "${HOME}/.pythonrc" ]]; then - export PYTHONSTARTUP="${HOME}/.pythonrc" - fi - - # Virtual environment support - if [[ -n "${VIRTUAL_ENV}" ]]; then - PATH="${VIRTUAL_ENV}/bin:${PATH}" - fi -} - -#----------------------------------------------------------------------------- -# Function: configure_python_aliases -# -# Description: -# Sets up aliases for common Python commands and tools. -# -# Arguments: -# None -# -# Returns: -# None -#----------------------------------------------------------------------------- -configure_python_aliases() { - if command -v "python${PYTHON_MAJOR}" >/dev/null; then - # Core Python aliases - alias python="python\${PYTHON_MAJOR}" # Default python version - alias python3="python\${PYTHON_VERSION}" # Specific python3 version - alias py='python' # Short form for python - - # Package management aliases - alias pip="pip\${PYTHON_MAJOR}" # Default pip version - alias pipup='pip install --upgrade pip' # Upgrade pip - alias piplist='pip list --outdated' # List outdated packages - - # Development tool aliases - alias ipy='ipython' # Interactive Python - alias pytest='python -m pytest' # Testing - alias pyenv='python -m venv' # Virtual environment - alias pyprof='python -m cProfile' # Profiling - alias pydoc='python -m pydoc' # Documentation - alias pep8='autopep8' # Code formatting - - # Debugging aliases - alias pdb='python -m pdb' # Debug - alias pytrace='python -m trace' # Trace execution - else - echo "Warning: Python ${PYTHON_MAJOR} not found in PATH" >&2 - fi -} - -#----------------------------------------------------------------------------- -# Main Execution -#----------------------------------------------------------------------------- - -# Configure Python paths -configure_python_paths - -# Set up Python environment variables -configure_python_environment - -# Set up Python aliases -configure_python_aliases diff --git a/lib/paths/ruby/ruby.paths.sh b/lib/paths/ruby/ruby.paths.sh deleted file mode 100644 index eb6b89bc..00000000 --- a/lib/paths/ruby/ruby.paths.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env bash - -################################################################################ -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ -# Script: ruby.paths.sh -# Version: 0.2.469 -# Author: Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# Description: Configure Ruby and Gem environment paths -# Website: https://dotfiles.io -# License: MIT -################################################################################ - -# Ruby version configuration -RUBY_VERSION="3.3.0" - -#----------------------------------------------------------------------------- -# Function: configure_ruby_paths -# -# Description: -# Configures Ruby-related paths based on the operating system. -# Supports both macOS (Homebrew) and Linux environments. -# -# Arguments: -# None -# -# Returns: -# 0 on success, 1 on failure -#----------------------------------------------------------------------------- -configure_ruby_paths() { - # macOS specific configuration - if [[ "${OSTYPE}" == "darwin"* ]]; then - if [[ -d "/opt/homebrew/opt/ruby/bin" ]]; then - RUBY_HOME="/opt/homebrew/opt/ruby/bin" - else - echo "Warning: Ruby not found in Homebrew path" >&2 - return 1 - fi - # Linux specific configuration - elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then - local ruby_path="/usr/lib/ruby/${RUBY_VERSION}" - if [[ -d "${ruby_path}" ]]; then - RUBY_HOME="${ruby_path}" - else - echo "Warning: Ruby not found at ${ruby_path}" >&2 - return 1 - fi - else - echo "Warning: Unsupported operating system" >&2 - return 1 - fi - - export RUBY_HOME - export PATH="${RUBY_HOME}:${PATH}" - return 0 -} - -#----------------------------------------------------------------------------- -# Function: configure_gem_paths -# -# Description: -# Configures RubyGems-related paths and environment variables. -# Sets up GEM_HOME and GEM_PATH for proper gem management. -# -# Arguments: -# None -# -# Returns: -# 0 on success, 1 on failure -#----------------------------------------------------------------------------- -configure_gem_paths() { - if command -v gem >/dev/null; then - # Get the gem directory from the gem environment - GEM_HOME="$(gem environment gemdir)" - if [[ -z "${GEM_HOME}" ]]; then - echo "Warning: Failed to determine GEM_HOME" >&2 - return 1 - fi - - GEM_PATH="${GEM_HOME}" - - # Export gem-related variables - export GEM_HOME - export GEM_PATH - export PATH="${GEM_PATH}:${PATH}" - export PATH="${GEM_HOME}:${PATH}" - else - echo "Warning: gem command not found" >&2 - return 1 - fi - return 0 -} - -#----------------------------------------------------------------------------- -# Main Execution -#----------------------------------------------------------------------------- - -# Configure Ruby paths -configure_ruby_paths - -# Configure Gem paths -configure_gem_paths diff --git a/lib/paths/tmux/tmux.paths.sh b/lib/paths/tmux/tmux.paths.sh deleted file mode 100644 index 9fb93daa..00000000 --- a/lib/paths/tmux/tmux.paths.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -# πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.469) - -# Made with β™₯ in London, UK by Sebastien Rousseau -# Copyright (c) 2015-2025. All rights reserved -# License: MIT - -## πŸ†ƒπŸ…ΌπŸ†„πŸ†‡ πŸ…ΏπŸ…°πŸ†ƒπŸ…·πŸ†‚ -if command -v 'tmux' >/dev/null; then - TMUX_PATH=$(command -v tmux) - export TMUX_PATH -fi diff --git a/package.json b/package.json index 52c290b8..fd44dd9e 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "scripts": "./scripts" }, "engines": { - "node": "^21.6.2" + "node": "^23.4.0" }, "files": [ "dist/" From 5e48c9ed5f44a641019927dec11f866d2af4d156 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Wed, 18 Dec 2024 20:04:58 +0000 Subject: [PATCH 13/17] docs(dotfiles): :memo: updating functions README.md and updates on deps --- lib/functions/README.md | 118 +++-- pnpm-lock.yaml | 1048 ++++++++++++++++++++++----------------- 2 files changed, 649 insertions(+), 517 deletions(-) diff --git a/lib/functions/README.md b/lib/functions/README.md index 6549bb69..d6e58804 100644 --- a/lib/functions/README.md +++ b/lib/functions/README.md @@ -1,5 +1,3 @@ - - dotfiles logo - - # Dotfiles (v0.2.469) Simply designed to fit your shell life 🐚 @@ -24,54 +20,72 @@ The functions are organized by category and are listed below. -### Navigation elements - -| Function | Description | Usage | -| :--- | :--- | :--- | -| `cdls` | Function to combine cd and ls. | `cdls ` | -| `goto` | Function to change to the directory inputed. | `goto ` | - -### Web Related Functions - -| Function | Description | Usage | -| :--- | :--- | :--- | -| `curlheader` | Function to return only a specific response header or all response headers for a given URL. | `curlheader [
]` | -| `curlstatus` | Function to return only the HTTP status code for a given URL. | `curlstatus ` | -| `curltime` | Function to return only the time it took to execute a given URL. | `curltime ` | -| `httpdebug` | Function to download a web page and show info on what took time. | `httpdebug ` | -| `view-source` | Function to view the source code of a web page. | `view-source ` | -| `whoisport` | Function to check if a port is open on a remote host. | `whoisport ` | - -### System Info and Utilities Functions - -| Function | Description | Usage | -| :--- | :--- | :--- | -| `environment` | Function to detect the current environment. | `environment` | -| `extract` | Function to extract most know archives with one command. The supported file formats include: tar.bz2, tar.gz, bz2, rar, gz, tar, tbz2, tgz, zip, Z, and 7z. | `extract ` | -| `filehead` | Function to display the first lines of a file. | `filehead ` | -| `freespace` | Function to display the free space on the disk. | `freespace` | -| `genpwd` | Function to generates a strong random password of 20 characters (similar to Apple) | `genpwd` | -| `hidehiddenfiles` | Function to hide hidden files in Finder. | `hidehiddenfiles` | -| `hostinfo` | Function to display useful host related information. | `hostinfo` | -| `hstats` | Function to display Ze Shell history stats informaton (requires zsh). | `hstats` | -| `keygen` | Function to generates SSH key pairs. | `keygen ` | -| `last` | List the modified files within 60 minutes. | `last` | -| `logout` | Function to logout from OS X via the Terminal. | `logout` | -| `lowercase` | Function to move filenames or directory names to lowercase. | `lowercase ` | -| `matrix` | Function to Enable Matrix Effect in the terminal. | `matrix` | -| `mount_read_only` | Function to mount a read-only disk image as read-write (OS X). | `mount_read_only ` | -| `myproc` | Function to list processes owned by an user.` | `myproc` | -| `prependpath` | Prepend $PATH without duplicates. | `prependpath ` | -| `ql` | Function to open any file in MacOS Quicklook Preview mode. | `ql ` | -| `rd` | Function to remove a directory and its files (OS X). | `rd ` | -| `remove_disk` | Spin down unneeded disk drives (OS X). | `remove_disk ` | -| `ren` | Function to rename files extension. | `ren ` | -| `showhiddenfiles` | Function to show hidden files in Finder. | `showhiddenfiles` | -| `size` | Function to display the size of a file or total size of a directory. | `size ` | -| `stopwatch` | Function to measure the time it takes to execute a program. | `stopwatch ` | -| `uppercase` | Function to move filenames or directory names to uppercase. | `uppercase ` | -| `vsc` | Function to open a file or folder in Visual Studio Code. | `vsc ` | -| `zipf` | Function to zip a file. | `zipf ` | +### Navigation + +| Function | Description | Usage | +| :-------------- | :------------------------------------- | :------------------- | +| `cdls` | Combine `cd` and `ls` into one command. | `cdls ` | +| `goto` | Change to the specified directory. | `goto ` | + +### API Utilities + +| Function | Description | Usage | +| :-------------- | :----------------------------------------------- | :----------------------- | +| `apihealth` | Check API health status. | `apihealth ` | +| `apilatency` | Measure API latency. | `apilatency ` | +| `apiload` | Analyze API load. | `apiload ` | +| `curlheader` | Fetch specific/all response headers for a URL. | `curlheader [
]` | +| `curlstatus` | Fetch HTTP status code for a URL. | `curlstatus ` | +| `curltime` | Measure time taken for a URL request. | `curltime ` | +| `httpdebug` | Debug HTTP requests and measure timings. | `httpdebug ` | +| `whoisport` | Check if a port is open on a remote host. | `whoisport ` | + +### File Operations + +| Function | Description | Usage | +| :--------------- | :----------------------------------------------- | :------------------------ | +| `encode64` | Encode data in Base64 format. | `encode64 ` | +| `extract` | Extract known archive formats. | `extract ` | +| `hexdump` | Display a hexadecimal dump of a file. | `hexdump ` | +| `hiddenfiles` | List hidden files in the current directory. | `hiddenfiles` | +| `kebabcase` | Convert filenames to kebab-case. | `kebabcase ` | +| `lowercase` | Convert filenames to lowercase. | `lowercase ` | +| `prependpath` | Add a directory to the `$PATH` environment variable. | `prependpath ` | +| `ren` | Rename file extensions. | `ren ` | +| `showhiddenfiles`| Show hidden files in Finder (macOS). | `showhiddenfiles` | +| `snakecase` | Convert filenames to snake_case. | `snakecase ` | +| `titlecase` | Convert filenames to Title Case. | `titlecase ` | +| `uppercase` | Convert filenames to uppercase. | `uppercase ` | +| `zipf` | Zip a file. | `zipf ` | + +### System Information + +| Function | Description | Usage | +| :--------------- | :----------------------------------------------- | :------------------------ | +| `backup` | Create system backups. | `backup` | +| `environment` | Detect the current environment. | `environment` | +| `freespace` | Display free disk space. | `freespace` | +| `hostinfo` | Display host-related information. | `hostinfo` | +| `last` | List files modified within the last 60 minutes. | `last` | +| `logout` | Log out from the current session (macOS). | `logout` | +| `matrix` | Enable matrix effect in the terminal. | `matrix` | +| `mount_read_only`| Mount a read-only disk image as read-write (macOS). | `mount_read_only ` | +| `myproc` | List processes owned by the user. | `myproc` | +| `size` | Display size of a file or total directory size. | `size ` | +| `stopwatch` | Measure execution time of a program. | `stopwatch ` | +| `sysinfo` | Display system information. | `sysinfo` | + +### Miscellaneous + +| Function | Description | Usage | +| :--------------- | :----------------------------------------------- | :------------------------ | +| `genpwd` | Generate a strong random password. | `genpwd` | +| `keygen` | Generate SSH key pairs. | `keygen ` | +| `ql` | Open any file in Quick Look preview (macOS). | `ql ` | +| `rd` | Remove a directory and its files (macOS). | `rd ` | +| `remove_disk` | Spin down unneeded disk drives (macOS). | `remove_disk ` | +| `vscode` | Open a file or folder in Visual Studio Code. | `vscode ` | +| `view-source` | View the source code of a web page. | `view-source ` | diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc69c3d6..9aabacb2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,517 +1,730 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -devDependencies: - '@types/node': - specifier: ^20.11.19 - version: 20.11.19 - compressing: - specifier: ^1.10.0 - version: 1.10.0 - filesizes: - specifier: ^0.1.2 - version: 0.1.2 - fs-extra: - specifier: 11.2.0 - version: 11.2.0 - husky: - specifier: ^9.0.11 - version: 9.0.11 - jsmin: - specifier: ^1.0.1 - version: 1.0.1 - rimraf: - specifier: ^5.0.5 - version: 5.0.5 - typescript: - specifier: ^5.3.3 - version: 5.3.3 - winston: - specifier: ^3.11.0 - version: 3.11.0 +importers: + + .: + devDependencies: + '@types/node': + specifier: 22.10.2 + version: 22.10.2 + compressing: + specifier: 1.10.1 + version: 1.10.1 + filesizes: + specifier: 0.1.2 + version: 0.1.2 + fs-extra: + specifier: 11.2.0 + version: 11.2.0 + husky: + specifier: 9.1.7 + version: 9.1.7 + jsmin: + specifier: ^1.0.1 + version: 1.0.1 + rimraf: + specifier: 6.0.1 + version: 6.0.1 + typescript: + specifier: 5.7.2 + version: 5.7.2 + winston: + specifier: 3.17.0 + version: 3.17.0 packages: - /@colors/colors@1.6.0: - resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==, tarball: https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz} + '@colors/colors@1.6.0': + resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} - dev: true - /@dabh/diagnostics@2.0.3: - resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==, tarball: https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz} + '@dabh/diagnostics@2.0.3': + resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} + + '@eggjs/yauzl@2.11.0': + resolution: {integrity: sha512-Jq+k2fCZJ3i3HShb0nxLUiAgq5pwo8JTT1TrH22JoehZQ0Nm2dvByGIja1NYfNyuE4Tx5/Dns5nVsBN/mlC8yg==} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@types/node@22.10.2': + resolution: {integrity: sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==} + + '@types/triple-beam@1.3.5': + resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + bl@1.2.3: + resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + buffer-alloc-unsafe@1.1.0: + resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} + + buffer-alloc@1.2.0: + resolution: {integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==} + + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + + buffer-fill@1.0.0: + resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==} + + chalk@3.0.0: + resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} + engines: {node: '>=8'} + + cli-table@0.3.11: + resolution: {integrity: sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==} + engines: {node: '>= 0.2.0'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + + color@3.2.1: + resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} + + colors@1.0.3: + resolution: {integrity: sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==} + engines: {node: '>=0.1.90'} + + colorspace@1.1.4: + resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} + + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + + compressing@1.10.1: + resolution: {integrity: sha512-XXwUffcVjqv8NGSQu1ttp6eMmuZ3zZEAec28Rt30o/vkXE20jXhowRQ9LXLY4uOgFkxXrNzApLobpam53Dc1AA==} + engines: {node: '>= 4.0.0'} + + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + duplexer@0.1.2: + resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + enabled@2.0.0: + resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} + + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + + fd-slicer2@1.2.0: + resolution: {integrity: sha512-3lBUNUckhMZduCc4g+Pw4Ve16LD9vpX9b8qUkkKq2mgDRLYWzblszZH2luADnJqjJe+cypngjCuKRm/IW12rRw==} + + fecha@4.2.3: + resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + + filesizes@0.1.2: + resolution: {integrity: sha512-B7S28jvoR/mSmccYwh6jkZYvsmuXqULibMkT9rU4hYZfjHTk7bw8Zmygss9UNX49YbJirzvGb2MSh/CbSWKzzQ==} + hasBin: true + + flushwritable@1.0.0: + resolution: {integrity: sha512-3VELfuWCLVzt5d2Gblk8qcqFro6nuwvxwMzHaENVDHI7rxcBRtMCwTk/E9FXcgh+82DSpavPNDueA9+RxXJoFg==} + + fn.name@1.1.0: + resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + + fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + + get-ready@1.0.0: + resolution: {integrity: sha512-mFXCZPJIlcYcth+N8267+mghfYN9h3EhsDa6JSnbA3Wrhh/XFpuowviFcsDeYZtKspQyWyJqfs4O6P8CHeTwzw==} + + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + gzip-size@5.1.1: + resolution: {integrity: sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==} + engines: {node: '>=6'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true + + iconv-lite@0.5.2: + resolution: {integrity: sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==} + engines: {node: '>=0.10.0'} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + + jsmin@1.0.1: + resolution: {integrity: sha512-OPuL5X/bFKgVdMvEIX3hnpx3jbVpFCrEM8pKPXjFkZUqg521r41ijdyTz7vACOhW6o1neVlcLyd+wkbK5fNHRg==} + engines: {node: '>=0.1.93'} + hasBin: true + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + kuler@2.0.0: + resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} + + logform@2.7.0: + resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==} + engines: {node: '>= 12.0.0'} + + lru-cache@11.0.2: + resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} + engines: {node: 20 || >=22} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + one-time@1.0.0: + resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + pretty-bytes@5.6.0: + resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} + engines: {node: '>=6'} + + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} + hasBin: true + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-stable-stringify@2.5.0: + resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} + engines: {node: '>=10'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + + stack-trace@0.0.10: + resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} + + streamifier@0.1.1: + resolution: {integrity: sha512-zDgl+muIlWzXNsXeyUfOk9dChMjlpkq0DRsxujtYPgyJ676yQ8jEm6zzaaWHFDg5BNcLuif0eD2MTyJdZqXpdg==} + engines: {node: '>=0.10'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + tar-stream@1.6.2: + resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==} + engines: {node: '>= 0.8.0'} + + text-hex@1.0.0: + resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} + + to-buffer@1.1.1: + resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} + + triple-beam@1.4.1: + resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} + engines: {node: '>= 14.0.0'} + + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + winston-transport@4.9.0: + resolution: {integrity: sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==} + engines: {node: '>= 12.0.0'} + + winston@3.17.0: + resolution: {integrity: sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==} + engines: {node: '>= 12.0.0'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + yazl@2.5.1: + resolution: {integrity: sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==} + +snapshots: + + '@colors/colors@1.6.0': {} + + '@dabh/diagnostics@2.0.3': dependencies: colorspace: 1.1.4 enabled: 2.0.0 kuler: 2.0.0 - dev: true - /@eggjs/yauzl@2.11.0: - resolution: {integrity: sha512-Jq+k2fCZJ3i3HShb0nxLUiAgq5pwo8JTT1TrH22JoehZQ0Nm2dvByGIja1NYfNyuE4Tx5/Dns5nVsBN/mlC8yg==, tarball: https://registry.npmjs.org/@eggjs/yauzl/-/yauzl-2.11.0.tgz} + '@eggjs/yauzl@2.11.0': dependencies: buffer-crc32: 0.2.13 fd-slicer2: 1.2.0 - dev: true - /@isaacs/cliui@8.0.2: - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==, tarball: https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz} - engines: {node: '>=12'} + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 - string-width-cjs: /string-width@4.2.3 + string-width-cjs: string-width@4.2.3 strip-ansi: 7.1.0 - strip-ansi-cjs: /strip-ansi@6.0.1 + strip-ansi-cjs: strip-ansi@6.0.1 wrap-ansi: 8.1.0 - wrap-ansi-cjs: /wrap-ansi@7.0.0 - dev: true + wrap-ansi-cjs: wrap-ansi@7.0.0 - /@pkgjs/parseargs@0.11.0: - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, tarball: https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz} - engines: {node: '>=14'} - requiresBuild: true - dev: true - optional: true - - /@types/node@20.11.19: - resolution: {integrity: sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==, tarball: https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz} + '@types/node@22.10.2': dependencies: - undici-types: 5.26.5 - dev: true + undici-types: 6.20.0 - /@types/triple-beam@1.3.5: - resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==, tarball: https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz} - dev: true + '@types/triple-beam@1.3.5': {} - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, tarball: https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz} - engines: {node: '>=8'} - dev: true + ansi-regex@5.0.1: {} - /ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==, tarball: https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz} - engines: {node: '>=12'} - dev: true + ansi-regex@6.1.0: {} - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==, tarball: https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz} - engines: {node: '>=8'} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - dev: true - /ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==, tarball: https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz} - engines: {node: '>=12'} - dev: true + ansi-styles@6.2.1: {} - /async@3.2.5: - resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==, tarball: https://registry.npmjs.org/async/-/async-3.2.5.tgz} - dev: true + async@3.2.6: {} - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, tarball: https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz} - dev: true + balanced-match@1.0.2: {} - /bl@1.2.3: - resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==, tarball: https://registry.npmjs.org/bl/-/bl-1.2.3.tgz} + bl@1.2.3: dependencies: readable-stream: 2.3.8 safe-buffer: 5.2.1 - dev: true - /brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==, tarball: https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz} + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 - dev: true - /buffer-alloc-unsafe@1.1.0: - resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==, tarball: https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz} - dev: true + buffer-alloc-unsafe@1.1.0: {} - /buffer-alloc@1.2.0: - resolution: {integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==, tarball: https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz} + buffer-alloc@1.2.0: dependencies: buffer-alloc-unsafe: 1.1.0 buffer-fill: 1.0.0 - dev: true - /buffer-crc32@0.2.13: - resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==, tarball: https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz} - dev: true + buffer-crc32@0.2.13: {} - /buffer-fill@1.0.0: - resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==, tarball: https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz} - dev: true + buffer-fill@1.0.0: {} - /chalk@3.0.0: - resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==, tarball: https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz} - engines: {node: '>=8'} + chalk@3.0.0: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - dev: true - /cli-table@0.3.11: - resolution: {integrity: sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==, tarball: https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz} - engines: {node: '>= 0.2.0'} + cli-table@0.3.11: dependencies: colors: 1.0.3 - dev: true - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==, tarball: https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz} + color-convert@1.9.3: dependencies: color-name: 1.1.3 - dev: true - /color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==, tarball: https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz} - engines: {node: '>=7.0.0'} + color-convert@2.0.1: dependencies: color-name: 1.1.4 - dev: true - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==, tarball: https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz} - dev: true + color-name@1.1.3: {} - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, tarball: https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz} - dev: true + color-name@1.1.4: {} - /color-string@1.9.1: - resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==, tarball: https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz} + color-string@1.9.1: dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 - dev: true - /color@3.2.1: - resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==, tarball: https://registry.npmjs.org/color/-/color-3.2.1.tgz} + color@3.2.1: dependencies: color-convert: 1.9.3 color-string: 1.9.1 - dev: true - /colors@1.0.3: - resolution: {integrity: sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==, tarball: https://registry.npmjs.org/colors/-/colors-1.0.3.tgz} - engines: {node: '>=0.1.90'} - dev: true + colors@1.0.3: {} - /colorspace@1.1.4: - resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==, tarball: https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz} + colorspace@1.1.4: dependencies: color: 3.2.1 text-hex: 1.0.0 - dev: true - /commander@4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==, tarball: https://registry.npmjs.org/commander/-/commander-4.1.1.tgz} - engines: {node: '>= 6'} - dev: true + commander@4.1.1: {} - /compressing@1.10.0: - resolution: {integrity: sha512-k2vpbZLaJoHe9euyUZjYYE8vOrbR19aU3HcWIYw5EBXiUs34ygfDVnXU+ubI41JXMriHutnoiu0ZFdwCkH6jPA==, tarball: https://registry.npmjs.org/compressing/-/compressing-1.10.0.tgz} - engines: {node: '>= 4.0.0'} + compressing@1.10.1: dependencies: '@eggjs/yauzl': 2.11.0 flushwritable: 1.0.0 get-ready: 1.0.0 iconv-lite: 0.5.2 mkdirp: 0.5.6 - pump: 3.0.0 + pump: 3.0.2 streamifier: 0.1.1 tar-stream: 1.6.2 yazl: 2.5.1 - dev: true - /core-util-is@1.0.3: - resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==, tarball: https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz} - dev: true + core-util-is@1.0.3: {} - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==, tarball: https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz} - engines: {node: '>= 8'} + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 - dev: true - /duplexer@0.1.2: - resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==, tarball: https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz} - dev: true + duplexer@0.1.2: {} - /eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==, tarball: https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz} - dev: true + eastasianwidth@0.2.0: {} - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==, tarball: https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz} - dev: true + emoji-regex@8.0.0: {} - /emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==, tarball: https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz} - dev: true + emoji-regex@9.2.2: {} - /enabled@2.0.0: - resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==, tarball: https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz} - dev: true + enabled@2.0.0: {} - /end-of-stream@1.4.4: - resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==, tarball: https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz} + end-of-stream@1.4.4: dependencies: once: 1.4.0 - dev: true - /fd-slicer2@1.2.0: - resolution: {integrity: sha512-3lBUNUckhMZduCc4g+Pw4Ve16LD9vpX9b8qUkkKq2mgDRLYWzblszZH2luADnJqjJe+cypngjCuKRm/IW12rRw==, tarball: https://registry.npmjs.org/fd-slicer2/-/fd-slicer2-1.2.0.tgz} + fd-slicer2@1.2.0: dependencies: pend: 1.2.0 - dev: true - /fecha@4.2.3: - resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==, tarball: https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz} - dev: true + fecha@4.2.3: {} - /filesizes@0.1.2: - resolution: {integrity: sha512-B7S28jvoR/mSmccYwh6jkZYvsmuXqULibMkT9rU4hYZfjHTk7bw8Zmygss9UNX49YbJirzvGb2MSh/CbSWKzzQ==, tarball: https://registry.npmjs.org/filesizes/-/filesizes-0.1.2.tgz} - hasBin: true + filesizes@0.1.2: dependencies: chalk: 3.0.0 cli-table: 0.3.11 commander: 4.1.1 gzip-size: 5.1.1 pretty-bytes: 5.6.0 - dev: true - /flushwritable@1.0.0: - resolution: {integrity: sha512-3VELfuWCLVzt5d2Gblk8qcqFro6nuwvxwMzHaENVDHI7rxcBRtMCwTk/E9FXcgh+82DSpavPNDueA9+RxXJoFg==, tarball: https://registry.npmjs.org/flushwritable/-/flushwritable-1.0.0.tgz} - dev: true + flushwritable@1.0.0: {} - /fn.name@1.1.0: - resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==, tarball: https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz} - dev: true + fn.name@1.1.0: {} - /foreground-child@3.1.1: - resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==, tarball: https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz} - engines: {node: '>=14'} + foreground-child@3.3.0: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 signal-exit: 4.1.0 - dev: true - /fs-constants@1.0.0: - resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==, tarball: https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz} - dev: true + fs-constants@1.0.0: {} - /fs-extra@11.2.0: - resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==, tarball: https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz} - engines: {node: '>=14.14'} + fs-extra@11.2.0: dependencies: graceful-fs: 4.2.11 jsonfile: 6.1.0 universalify: 2.0.1 - dev: true - /get-ready@1.0.0: - resolution: {integrity: sha512-mFXCZPJIlcYcth+N8267+mghfYN9h3EhsDa6JSnbA3Wrhh/XFpuowviFcsDeYZtKspQyWyJqfs4O6P8CHeTwzw==, tarball: https://registry.npmjs.org/get-ready/-/get-ready-1.0.0.tgz} - dev: true + get-ready@1.0.0: {} - /glob@10.3.10: - resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==, tarball: https://registry.npmjs.org/glob/-/glob-10.3.10.tgz} - engines: {node: '>=16 || 14 >=14.17'} - hasBin: true + glob@11.0.0: dependencies: - foreground-child: 3.1.1 - jackspeak: 2.3.6 - minimatch: 9.0.3 - minipass: 7.0.4 - path-scurry: 1.10.1 - dev: true + foreground-child: 3.3.0 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 - /graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==, tarball: https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz} - dev: true + graceful-fs@4.2.11: {} - /gzip-size@5.1.1: - resolution: {integrity: sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==, tarball: https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz} - engines: {node: '>=6'} + gzip-size@5.1.1: dependencies: duplexer: 0.1.2 pify: 4.0.1 - dev: true - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==, tarball: https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz} - engines: {node: '>=8'} - dev: true + has-flag@4.0.0: {} - /husky@9.0.11: - resolution: {integrity: sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==, tarball: https://registry.npmjs.org/husky/-/husky-9.0.11.tgz} - engines: {node: '>=18'} - hasBin: true - dev: true + husky@9.1.7: {} - /iconv-lite@0.5.2: - resolution: {integrity: sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==, tarball: https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.2.tgz} - engines: {node: '>=0.10.0'} + iconv-lite@0.5.2: dependencies: safer-buffer: 2.1.2 - dev: true - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==, tarball: https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz} - dev: true + inherits@2.0.4: {} - /is-arrayish@0.3.2: - resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==, tarball: https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz} - dev: true + is-arrayish@0.3.2: {} - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==, tarball: https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz} - engines: {node: '>=8'} - dev: true + is-fullwidth-code-point@3.0.0: {} - /is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==, tarball: https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz} - engines: {node: '>=8'} - dev: true + is-stream@2.0.1: {} - /isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==, tarball: https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz} - dev: true + isarray@1.0.0: {} - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==, tarball: https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz} - dev: true + isexe@2.0.0: {} - /jackspeak@2.3.6: - resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==, tarball: https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz} - engines: {node: '>=14'} + jackspeak@4.0.2: dependencies: '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - dev: true - /jsmin@1.0.1: - resolution: {integrity: sha512-OPuL5X/bFKgVdMvEIX3hnpx3jbVpFCrEM8pKPXjFkZUqg521r41ijdyTz7vACOhW6o1neVlcLyd+wkbK5fNHRg==, tarball: https://registry.npmjs.org/jsmin/-/jsmin-1.0.1.tgz} - engines: {node: '>=0.1.93'} - hasBin: true - dev: true + jsmin@1.0.1: {} - /jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==, tarball: https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz} + jsonfile@6.1.0: dependencies: universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 - dev: true - /kuler@2.0.0: - resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==, tarball: https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz} - dev: true + kuler@2.0.0: {} - /logform@2.6.0: - resolution: {integrity: sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==, tarball: https://registry.npmjs.org/logform/-/logform-2.6.0.tgz} - engines: {node: '>= 12.0.0'} + logform@2.7.0: dependencies: '@colors/colors': 1.6.0 '@types/triple-beam': 1.3.5 fecha: 4.2.3 ms: 2.1.3 - safe-stable-stringify: 2.4.3 + safe-stable-stringify: 2.5.0 triple-beam: 1.4.1 - dev: true - /lru-cache@10.2.0: - resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==, tarball: https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz} - engines: {node: 14 || >=16.14} - dev: true + lru-cache@11.0.2: {} - /minimatch@9.0.3: - resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==, tarball: https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz} - engines: {node: '>=16 || 14 >=14.17'} + minimatch@10.0.1: dependencies: brace-expansion: 2.0.1 - dev: true - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==, tarball: https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz} - dev: true + minimist@1.2.8: {} - /minipass@7.0.4: - resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==, tarball: https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz} - engines: {node: '>=16 || 14 >=14.17'} - dev: true + minipass@7.1.2: {} - /mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==, tarball: https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz} - hasBin: true + mkdirp@0.5.6: dependencies: minimist: 1.2.8 - dev: true - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==, tarball: https://registry.npmjs.org/ms/-/ms-2.1.3.tgz} - dev: true + ms@2.1.3: {} - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==, tarball: https://registry.npmjs.org/once/-/once-1.4.0.tgz} + once@1.4.0: dependencies: wrappy: 1.0.2 - dev: true - /one-time@1.0.0: - resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==, tarball: https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz} + one-time@1.0.0: dependencies: fn.name: 1.1.0 - dev: true - /path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==, tarball: https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz} - engines: {node: '>=8'} - dev: true + package-json-from-dist@1.0.1: {} - /path-scurry@1.10.1: - resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==, tarball: https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz} - engines: {node: '>=16 || 14 >=14.17'} + path-key@3.1.1: {} + + path-scurry@2.0.0: dependencies: - lru-cache: 10.2.0 - minipass: 7.0.4 - dev: true + lru-cache: 11.0.2 + minipass: 7.1.2 - /pend@1.2.0: - resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==, tarball: https://registry.npmjs.org/pend/-/pend-1.2.0.tgz} - dev: true + pend@1.2.0: {} - /pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==, tarball: https://registry.npmjs.org/pify/-/pify-4.0.1.tgz} - engines: {node: '>=6'} - dev: true + pify@4.0.1: {} - /pretty-bytes@5.6.0: - resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==, tarball: https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz} - engines: {node: '>=6'} - dev: true + pretty-bytes@5.6.0: {} - /process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==, tarball: https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz} - dev: true + process-nextick-args@2.0.1: {} - /pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==, tarball: https://registry.npmjs.org/pump/-/pump-3.0.0.tgz} + pump@3.0.2: dependencies: end-of-stream: 1.4.4 once: 1.4.0 - dev: true - /readable-stream@2.3.8: - resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==, tarball: https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz} + readable-stream@2.3.8: dependencies: core-util-is: 1.0.3 inherits: 2.0.4 @@ -520,128 +733,75 @@ packages: safe-buffer: 5.1.2 string_decoder: 1.1.1 util-deprecate: 1.0.2 - dev: true - /readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==, tarball: https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz} - engines: {node: '>= 6'} + readable-stream@3.6.2: dependencies: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: true - /rimraf@5.0.5: - resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==, tarball: https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz} - engines: {node: '>=14'} - hasBin: true + rimraf@6.0.1: dependencies: - glob: 10.3.10 - dev: true + glob: 11.0.0 + package-json-from-dist: 1.0.1 - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==, tarball: https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz} - dev: true + safe-buffer@5.1.2: {} - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==, tarball: https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz} - dev: true + safe-buffer@5.2.1: {} - /safe-stable-stringify@2.4.3: - resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==, tarball: https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz} - engines: {node: '>=10'} - dev: true + safe-stable-stringify@2.5.0: {} - /safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==, tarball: https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz} - dev: true + safer-buffer@2.1.2: {} - /shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==, tarball: https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz} - engines: {node: '>=8'} + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - dev: true - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==, tarball: https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz} - engines: {node: '>=8'} - dev: true + shebang-regex@3.0.0: {} - /signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==, tarball: https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz} - engines: {node: '>=14'} - dev: true + signal-exit@4.1.0: {} - /simple-swizzle@0.2.2: - resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==, tarball: https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz} + simple-swizzle@0.2.2: dependencies: is-arrayish: 0.3.2 - dev: true - /stack-trace@0.0.10: - resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==, tarball: https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz} - dev: true + stack-trace@0.0.10: {} - /streamifier@0.1.1: - resolution: {integrity: sha512-zDgl+muIlWzXNsXeyUfOk9dChMjlpkq0DRsxujtYPgyJ676yQ8jEm6zzaaWHFDg5BNcLuif0eD2MTyJdZqXpdg==, tarball: https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz} - engines: {node: '>=0.10'} - dev: true + streamifier@0.1.1: {} - /string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, tarball: https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz} - engines: {node: '>=8'} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - dev: true - /string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==, tarball: https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz} - engines: {node: '>=12'} + string-width@5.1.2: dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 strip-ansi: 7.1.0 - dev: true - /string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==, tarball: https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz} + string_decoder@1.1.1: dependencies: safe-buffer: 5.1.2 - dev: true - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==, tarball: https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz} + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 - dev: true - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==, tarball: https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz} - engines: {node: '>=8'} + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 - dev: true - /strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==, tarball: https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz} - engines: {node: '>=12'} + strip-ansi@7.1.0: dependencies: - ansi-regex: 6.0.1 - dev: true + ansi-regex: 6.1.0 - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==, tarball: https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz} - engines: {node: '>=8'} + supports-color@7.2.0: dependencies: has-flag: 4.0.0 - dev: true - /tar-stream@1.6.2: - resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==, tarball: https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz} - engines: {node: '>= 0.8.0'} + tar-stream@1.6.2: dependencies: bl: 1.2.3 buffer-alloc: 1.2.0 @@ -650,103 +810,61 @@ packages: readable-stream: 2.3.8 to-buffer: 1.1.1 xtend: 4.0.2 - dev: true - /text-hex@1.0.0: - resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==, tarball: https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz} - dev: true + text-hex@1.0.0: {} - /to-buffer@1.1.1: - resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==, tarball: https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz} - dev: true + to-buffer@1.1.1: {} - /triple-beam@1.4.1: - resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==, tarball: https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz} - engines: {node: '>= 14.0.0'} - dev: true + triple-beam@1.4.1: {} - /typescript@5.3.3: - resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==, tarball: https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz} - engines: {node: '>=14.17'} - hasBin: true - dev: true + typescript@5.7.2: {} - /undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==, tarball: https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz} - dev: true + undici-types@6.20.0: {} - /universalify@2.0.1: - resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==, tarball: https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz} - engines: {node: '>= 10.0.0'} - dev: true + universalify@2.0.1: {} - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==, tarball: https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz} - dev: true + util-deprecate@1.0.2: {} - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==, tarball: https://registry.npmjs.org/which/-/which-2.0.2.tgz} - engines: {node: '>= 8'} - hasBin: true + which@2.0.2: dependencies: isexe: 2.0.0 - dev: true - /winston-transport@4.7.0: - resolution: {integrity: sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==, tarball: https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz} - engines: {node: '>= 12.0.0'} + winston-transport@4.9.0: dependencies: - logform: 2.6.0 + logform: 2.7.0 readable-stream: 3.6.2 triple-beam: 1.4.1 - dev: true - /winston@3.11.0: - resolution: {integrity: sha512-L3yR6/MzZAOl0DsysUXHVjOwv8mKZ71TrA/41EIduGpOOV5LQVodqN+QdQ6BS6PJ/RdIshZhq84P/fStEZkk7g==, tarball: https://registry.npmjs.org/winston/-/winston-3.11.0.tgz} - engines: {node: '>= 12.0.0'} + winston@3.17.0: dependencies: '@colors/colors': 1.6.0 '@dabh/diagnostics': 2.0.3 - async: 3.2.5 + async: 3.2.6 is-stream: 2.0.1 - logform: 2.6.0 + logform: 2.7.0 one-time: 1.0.0 readable-stream: 3.6.2 - safe-stable-stringify: 2.4.3 + safe-stable-stringify: 2.5.0 stack-trace: 0.0.10 triple-beam: 1.4.1 - winston-transport: 4.7.0 - dev: true + winston-transport: 4.9.0 - /wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==, tarball: https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz} - engines: {node: '>=10'} + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true - /wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==, tarball: https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz} - engines: {node: '>=12'} + wrap-ansi@8.1.0: dependencies: ansi-styles: 6.2.1 string-width: 5.1.2 strip-ansi: 7.1.0 - dev: true - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==, tarball: https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz} - dev: true + wrappy@1.0.2: {} - /xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==, tarball: https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz} - engines: {node: '>=0.4'} - dev: true + xtend@4.0.2: {} - /yazl@2.5.1: - resolution: {integrity: sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==, tarball: https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz} + yazl@2.5.1: dependencies: buffer-crc32: 0.2.13 - dev: true From 57a2ec37bf4c4044ac58355d604b6840812a036d Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Wed, 18 Dec 2024 20:20:09 +0000 Subject: [PATCH 14/17] docs(dotfiles): :memo: add paths README.md --- lib/paths/default/README.md | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 lib/paths/default/README.md diff --git a/lib/paths/default/README.md b/lib/paths/default/README.md new file mode 100644 index 00000000..d99530a9 --- /dev/null +++ b/lib/paths/default/README.md @@ -0,0 +1,52 @@ +dotfiles logo + +# Dotfiles Path Configuration Scripts + +Simply designed to fit your shell life 🐚 + +![Dotfiles banner][banner] + +This repository includes two scripts designed to manage and customize the system `PATH` variable for enhanced environment configuration. The scripts are organized and detailed below. + +## πŸ”‘ Scripts List + + + +### Path Configuration + +| Script | Description | Usage | +| :---------------- | :----------------------------------------------- | :----------------------------- | +| `custom.paths.sh` | Configure custom paths for frameworks and tools. | `source custom.paths.sh` | +| `default.paths.sh`| Set default paths for common system utilities. | `source default.paths.sh` | + +### Features + +#### `custom.paths.sh` + +- **System Paths:** Adds essential directories like `/usr/local/bin`, `/usr/bin`, etc. +- **Frameworks & Applications:** Adds paths for frameworks like Apple binaries, TeX Live, Cargo, Go, and Node.js. +- **Application-Specific Paths:** Configures paths for tools like Topaz Photo AI, Little Snitch, and iTerm. +- **Deduplication:** Ensures no duplicate entries in the `PATH` variable. + +#### `default.paths.sh` + +- **System Paths:** Sets up basic system directories like `/usr/local/bin`, `/usr/local/sbin`, `/usr/bin`, etc. +- **Homebrew Paths:** Includes paths for Homebrew binaries and sbin. +- **Ruby Paths:** Adds paths for Ruby binaries and gem directories, checking installation methods. + +### Usage + +| Command | Description | +| :-------------------------- | :------------------------------ | +| `source custom.paths.sh` | Apply custom path configuration.| +| `source default.paths.sh` | Apply default path configuration.| +| `echo $PATH` | Verify the current `PATH`. | + + + +[banner]: https://kura.pro/dotfiles/v2/images/titles/title-dotfiles.svg From 535e36db8b290d46a6ffa992157659dfcaaf7710 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Wed, 18 Dec 2024 20:32:52 +0000 Subject: [PATCH 15/17] refactor(dotfiles): :art: cleaning up paths directory --- lib/paths.sh | 2 +- lib/paths/{default => }/README.md | 0 lib/paths/{default => }/custom.paths.sh | 0 lib/paths/{default => }/default.paths.sh | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename lib/paths/{default => }/README.md (100%) rename lib/paths/{default => }/custom.paths.sh (100%) rename lib/paths/{default => }/default.paths.sh (100%) diff --git a/lib/paths.sh b/lib/paths.sh index e1ac034f..46257a3a 100644 --- a/lib/paths.sh +++ b/lib/paths.sh @@ -23,7 +23,7 @@ # ShellCheck Documentation: https://github.com/koalaman/shellcheck load_paths() { - for path in "${HOME}"/.dotfiles/lib/paths/[!.#]*/*.sh; do + for path in "${HOME}"/.dotfiles/lib/paths/*.sh; do # shellcheck source=/dev/null source "${path}" done diff --git a/lib/paths/default/README.md b/lib/paths/README.md similarity index 100% rename from lib/paths/default/README.md rename to lib/paths/README.md diff --git a/lib/paths/default/custom.paths.sh b/lib/paths/custom.paths.sh similarity index 100% rename from lib/paths/default/custom.paths.sh rename to lib/paths/custom.paths.sh diff --git a/lib/paths/default/default.paths.sh b/lib/paths/default.paths.sh similarity index 100% rename from lib/paths/default/default.paths.sh rename to lib/paths/default.paths.sh From af6ab49abc14101642da47ab5d4c5b6d80c66707 Mon Sep 17 00:00:00 2001 From: Sebastien Rousseau Date: Wed, 18 Dec 2024 21:45:36 +0000 Subject: [PATCH 16/17] docs(dotfiles): :memo: updated documentation and refactoring loaders --- lib/README.md | 82 +++++++++++++++++++++++++++-- lib/configurations.sh | 20 +++++-- lib/functions.sh | 25 ++++++--- lib/history.sh | 118 ++++++++++++------------------------------ lib/paths.sh | 26 +++++++--- 5 files changed, 165 insertions(+), 106 deletions(-) diff --git a/lib/README.md b/lib/README.md index 863c7686..433cf82c 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,5 +1,3 @@ - - dotfiles logo - +# Dotfiles Shell Configuration Scripts + +Simply designed to fit your shell life 🐚 + +![Dotfiles banner][banner] + +This repository includes various scripts to enhance your shell experience, manage configurations, and customize behavior. The scripts are organized and detailed below. + +## πŸ”‘ Scripts List + + + +### Alias Management + +| Script | Description | Usage | +| :---------------- | :----------------------------------------------- | :----------------------------- | +| `aliases.sh` | Manage and load custom shell aliases. | `source aliases.sh` | + +#### Features + +- **Remove All Aliases:** Clears all existing aliases in the current shell environment. +- **Load Custom Aliases:** Sources alias definitions from a specified directory within `.dotfiles`. + +### Configuration Management + +| Script | Description | Usage | +| :---------------- | :----------------------------------------------- | :----------------------------- | +| `configurations.sh` | Load custom shell configurations. | `source configurations.sh` | + +#### Features + +- **Custom Configurations:** Loads shell-specific configurations from the `.dotfiles` directory. +- **Error Handling:** Reports missing configuration files or sourcing issues. + +### Function Management + +| Script | Description | Usage | +| :---------------- | :----------------------------------------------- | :----------------------------- | +| `functions.sh` | Load custom executable functions. | `source functions.sh` | + +#### Features + +- **Custom Functions:** Sources user-defined functions from the `.dotfiles/lib/functions` directory. +- **Directory Check:** Ensures the functions directory exists before sourcing. + +### History Management + +| Script | Description | Usage | +| :---------------- | :----------------------------------------------- | :----------------------------- | +| `history.sh` | Manage and configure shell history behavior. | `source history.sh` | + +#### Features + +- **Clear History:** Clears the history file and removes duplicates. +- **List History:** Displays shell history with enhanced formatting. +- **History Configuration:** Sets up shell-specific history options for Bash and Zsh. + +### Path Management + +| Script | Description | Usage | +| :---------------- | :----------------------------------------------- | :----------------------------- | +| `paths.sh` | Load custom path configurations. | `source paths.sh` | + +#### Features + +- **Load Paths:** Adds directories to the shell `PATH` variable from `.dotfiles/lib/paths`. +- **Error Reporting:** Alerts the user if the paths directory is missing. + +### Usage + +| Command | Description | +| :-------------------------- | :--------------------------------------- | +| `source