Last active
September 12, 2025 09:36
-
-
Save runlevel5/e6d46fede965cf40838d1cb2a5efec15 to your computer and use it in GitHub Desktop.
Revisions
-
runlevel5 revised this gist
Sep 12, 2025 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,4 +61,14 @@ and also override manpages path too: export MANPATH="$HOME/.local/share/man:" ``` then reload your shell for fish shell (which is also written in Rust), it is a bit different but pretty much the same, simply modify `~/.config/fish/config.fish` file: ``` if status is-interactive # Commands to run in interactive sessions can go here set -gx PATH $HOME/.local/uubin $PATH set -gx MANPATH $HOME/.local/share/man: end ``` -
runlevel5 revised this gist
Sep 12, 2025 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Run following bash script: ```bash #!/bin/bash # For binaries SRC_BIN_DIR="/usr/bin" DEST_BIN_DIR="$HOME/.local/uubin" @@ -27,6 +27,7 @@ done echo "All uu_ files copied to $DEST_BIN_DIR with prefix stripped." # For manual pages SRC_MAN_DIR="/usr/share/man/man1" DEST_MAN_DIR="$HOME/.local/share/man/man1" -
runlevel5 revised this gist
Sep 12, 2025 . No changes.There are no files selected for viewing
-
runlevel5 revised this gist
Sep 12, 2025 . 1 changed file with 34 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,28 +4,48 @@ Run following bash script: #!/bin/bash # Source and destination directories SRC_BIN_DIR="/usr/bin" DEST_BIN_DIR="$HOME/.local/uubin" # Ensure destination directory exists mkdir -p "$DEST_BIN_DIR" # Find files starting with 'uu_' in $SRC_BIN_DIR find "$SRC_BIN_DIR" -type f -name 'uu_*' | while read -r src_file; do # Get the base filename filename=$(basename "$src_file") # Strip the 'uu_' prefix stripped_name="${filename#uu_}" # Copy to destination with new name, preserving attributes cp -u --preserve=mode,timestamps "$src_file" "$DEST_BIN_DIR/$stripped_name" # Make sure it's executable chmod +x "$DEST_BIN_DIR/$stripped_name" done echo "All uu_ files copied to $DEST_BIN_DIR with prefix stripped." SRC_MAN_DIR="/usr/share/man/man1" DEST_MAN_DIR="$HOME/.local/share/man/man1" # Ensure destination directory exists mkdir -p "$DEST_MAN_DIR" find "$SRC_MAN_DIR" -type f -name 'uu_*.gz' | while read -r src_file; do # Get the base filename filename=$(basename "$src_file") # Strip the 'uu_' prefix stripped_name="${filename#uu_}" # Copy to destination with new name, preserving attributes ln -sf "$SRC_MAN_DIR/$filename" "$DEST_MAN_DIR/$stripped_name" done echo "All uu_ man files linked to $DEST_MAN_DIR with prefix stripped." ``` then appending the `PATH` in your rc profile, if you are using bash, it would be `~/.bashrc` or `~/.bash_profile`: @@ -34,4 +54,10 @@ then appending the `PATH` in your rc profile, if you are using bash, it would be export PATH="$HOME/.local/uubin:$PATH" ``` and also override manpages path too: ``` export MANPATH="$HOME/.local/share/man:" ``` then reload your shell -
runlevel5 revised this gist
Sep 12, 2025 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,7 @@ Run following bash script: # Source and destination directories SRC_DIR="/usr/bin" DEST_DIR="$HOME/.local/uubin" # Ensure destination directory exists mkdir -p "$DEST_DIR" @@ -32,7 +31,7 @@ echo "All uu_ files copied to $DEST_DIR with prefix stripped." then appending the `PATH` in your rc profile, if you are using bash, it would be `~/.bashrc` or `~/.bash_profile`: ``` export PATH="$HOME/.local/uubin:$PATH" ``` then reload your shell -
runlevel5 created this gist
Sep 12, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ Run following bash script: ```bash #!/bin/bash # Source and destination directories SRC_DIR="/usr/bin" XDG_CONFIG_HOME="$HOME/.config" DEST_DIR="$XDG_CONFIG_HOME/uubin" # Ensure destination directory exists mkdir -p "$DEST_DIR" # Find files starting with 'uu_' in /usr/bin find "$SRC_DIR" -type f -name 'uu_*' | while read -r src_file; do # Get the base filename filename=$(basename "$src_file") # Strip the 'uu_' prefix stripped_name="${filename#uu_}" # Copy to destination with new name, preserving attributes cp -u --preserve=mode,timestamps "$src_file" "$DEST_DIR/$stripped_name" # Make sure it's executable chmod +x "$DEST_DIR/$stripped_name" done echo "All uu_ files copied to $DEST_DIR with prefix stripped." ``` then appending the `PATH` in your rc profile, if you are using bash, it would be `~/.bashrc` or `~/.bash_profile`: ``` export PATH="$XDG_CONFIG_HOME/uubin:$PATH" ``` then reload your shell