{"id":26851387,"url":"https://github.com/azizemir/zshrc","last_synced_at":"2026-02-01T04:34:10.274Z","repository":{"id":265121178,"uuid":"895187306","full_name":"AzizEmir/zshrc","owner":"AzizEmir","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-15T23:31:31.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T08:06:37.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AzizEmir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-27T18:05:16.000Z","updated_at":"2025-02-15T22:53:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f127f40-87ac-42fc-96ac-00a65eba0931","html_url":"https://github.com/AzizEmir/zshrc","commit_stats":null,"previous_names":["azizemir/zshrc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AzizEmir/zshrc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzizEmir%2Fzshrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzizEmir%2Fzshrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzizEmir%2Fzshrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzizEmir%2Fzshrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AzizEmir","download_url":"https://codeload.github.com/AzizEmir/zshrc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AzizEmir%2Fzshrc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28967985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T03:46:10.227Z","status":"ssl_error","status_checked_at":"2026-02-01T03:46:01.693Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-30T22:31:12.679Z","updated_at":"2026-02-01T04:34:10.254Z","avatar_url":"https://github.com/AzizEmir.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# zshrc\n\n```zsh\nzoxide xclip nala net-tools exa\n```\n\n\n```zsh\n# ---------------------------\n# when the (CTRL + A) \"^A\" key is pressed in the terminal, runs the \"z ..\" command\n# ---------------------------\nz_up() {\n  BUFFER=\"z ..\"\n  zle .accept-line\n}\nzle -N z_up\nbindkey \"^A\" z_up\n```\n\n```zsh\n# ---------------------------\n# This function will print each directory in the $PATH on a new line, as the tr command replaces the colon (:) separator with a newline (\\n).\n# ---------------------------\npath() {\n    echo \"$PATH\" | tr ':' '\\n'\n}\n# ---------------------------\n# The catclip() function in your example takes a file as an argument and copies its contents to the clipboard using xclip\n# ---------------------------\ncatclip() {\n    cat \"$1\" | xclip -selection clipboard\n}\n```\n\n```zsh\n# ---------------------------\n# Networking\n# ---------------------------\nalias  myip='curl ifconfig.me'        # Fetch external IP address\nalias ports='netstat -tulanp'         # Show active network connections and listening ports\n\n# Best ifconfig view\nrip() {\n    ifconfig | awk 'BEGIN {\n        # Renk kodları\n        BRIGHT_YELLOW=\"\\033[93m\"    # Parlak altın sarısı\n        BRIGHT_MAGENTA=\"\\033[95m\"   # Parlak mor\n        BRIGHT_BLUE=\"\\033[94m\"      # Parlak mavi\n        BRIGHT_GREEN=\"\\033[92m\"     # Parlak yeşil\n        RESET=\"\\033[0m\"\n    }\n    {\n        # Arayüz isimlerini parlak mavi renkle\n        if (match($0, /^[a-zA-Z0-9:_]+:/)) {\n            interface_name = substr($0, 1, RLENGTH)\n            rest_of_line = substr($0, RLENGTH + 1)\n            print BRIGHT_BLUE interface_name RESET rest_of_line\n        } else {\n            # RX packets ve TX packets başlıklarını parlak yeşil ile renklendir\n            gsub(/RX packets/, BRIGHT_GREEN \"\u0026\" RESET)\n            gsub(/TX packets/, BRIGHT_GREEN \"\u0026\" RESET)\n\n            # Boyut bilgilerini parlak yeşil ile renklendir\n            gsub(/\\([0-9.]+ [KMGTPE]iB\\)/, BRIGHT_GREEN \"\u0026\" RESET)\n\n            # \"ether\" ve MAC adresini renklendir\n            gsub(/ether /, BRIGHT_YELLOW \"\u0026\" RESET)\n            gsub(/[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}/, BRIGHT_MAGENTA \"\u0026\" RESET)\n\n            # \"inet\", \"netmask\", ve \"broadcast\" kelimelerini parlak altın sarı ile renklendir\n            gsub(/inet |netmask |broadcast /, BRIGHT_YELLOW \"\u0026\" RESET)\n\n            # IP adreslerini parlak mor ile renklendir\n            gsub(/[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+/, BRIGHT_MAGENTA \"\u0026\" RESET)\n\n            print\n        }\n    }'\n}\n```\n\n![colored ifconfig](https://github.com/user-attachments/assets/2177696f-5ca7-432b-a72a-9e36e32d2e98)\n\n```zsh\n# ---------------------------\n# Privileged Command Shortcut\n# ---------------------------\nalias _=\"sudo\"                         # Quick sudo shortcut\n```\n\n```zsh\n# ---------------------------\n# Text Editing\n# ---------------------------\nalias     v=\"vim\"                        # Launch Vim editor\nalias    sv=\"_ vim\"                      # Alternate Vim alias\nalias zshrc=\"v ~/.zshrc\"                 # Open user's zshrc file with vim\n```\n\n```zsh\n# ---------------------------\n# Package Management with Nala\n# ---------------------------\nalias nalas=\"nala search\"              # Search for packages with Nala\nalias nalau=\"_ nala update\"            # Update package lists with Nala\nalias nalag=\"_ nala upgrade\"           # Upgrade all packages with Nala\nalias nalai=\"_ nala install\"           # Install a package using Nala\nalias nalap=\"_ nala purge\"             # Remove packages completely with Nala\n```\n\n```zsh\n# ---------------------------\n# TAR Management\n# ---------------------------\nalias  tart='tar --list    --verbose -f'  # List the contents of the archive\nalias  tarc='tar --create  --verbose -f'  # Create a new archive\nalias  tarx='tar --extract --verbose -f'  # Extract the archive\n\nalias  tarz='tar --gzip --create  --verbose -f' # Create a gzip compressed archive\nalias tarzx='tar --gzip --extract --verbose -f' # Extract a gzip compressed archive\nalias tartz='tar --gzip --list --verbose -f' # List the contents of a gzip compressed archive\n\n# Aliases by Archive Type\nalias  tarj='tar --bzip2 --create  --verbose -f'  # Create a bzip2 compressed archive\nalias tarjx='tar --bzip2 --extract --verbose -f'  # Extract a bzip2 compressed archive\nalias tartj='tar --bzip2 --list    --verbose -f'  # List the contents of a bzip2 compressed archive\n\n# Aliases by Compression Format\nalias  tarxz='tar --xz --extract --verbose -f'  # Extract an XZ compressed archive\nalias tarzxz='tar --xz --list    --verbose -f'  # List the contents of an XZ compressed archive\n```\n\n```zsh\n# ---------------------------\n# Weather Utilities\n# ---------------------------\nalias    wttr='curl wttr.in'           # Fetch weather information\nalias weather='curl wttr.in'           # Alternate alias for weather\n```\n\n```zsh\n# ---------------------------\n# Command Line Utilities\n# ---------------------------\nalias  h='history'                     # Show command history\nalias hg='history | grep $1'           # Search command history with a keyword\nalias  c='clear'                       # Clear the terminal screen\n```\n\n```zsh\n# ---------------------------\n# File Operations\n# ---------------------------\n# ────────────────────────────────────────────────────\n# 📁 Safe Copy: Interactive \u0026 Verbose  \n# ────────────────────────────────────────────────────\nalias cp=\"cp --interactive --verbose\"\n# ────────────────────────────────────────────────────\n# 🚚 Safe Move: Interactive \u0026 Verbose  \n# ────────────────────────────────────────────────────\nalias mv=\"mv --interactive --verbose\"\n# ────────────────────────────────────────────────────\n# 🗑️  Safe Remove: Protect root \u0026 Verbose  \n# ────────────────────────────────────────────────────\nalias rm=\"rm --interactive --verbose --preserve-root\"\n# ────────────────────────────────────────────────────\n# 📂 Create Directory: Parent directories \u0026 Verbose  \n# ────────────────────────────────────────────────────\nalias mdir=\"mkdir --parents --verbose\"\n# ────────────────────────────────────────────────────\n# 📂 Create Directory \u0026 Move Into It  \n# ────────────────────────────────────────────────────\nmdircd() {\n    mkdir -pv \"$1\" \u0026\u0026 z \"$1\"\n}\n# ────────────────────────────────────────────────────\n# 📂 Enhanced ls: List directories first with icons  \n# ────────────────────────────────────────────────────\nalias els=\"exa --group --sort=type --icons\"\n# ────────────────────────────────────────────────────\n# 📜 Extended ls: Show detailed list without size/user  \n# ────────────────────────────────────────────────────\nalias ell=\"exa --long --header --classify --no-filesize --no-user --no-permissions\"\n# ────────────────────────────────────────────────────\n# 🎨 Detailed View: Grouped, sorted, and with icons  \n# ────────────────────────────────────────────────────\nalias elld=\"exa --long --header --classify --sort=type --group --icons\"\n# ────────────────────────────────────────────────────\n# 🔍 Extended ls (Sorted): Organized, no size/user  \n# ────────────────────────────────────────────────────\nalias ellt=\"exa --long --header --classify --sort=type --no-filesize --no-user --no-permissions\"\n# ────────────────────────────────────────────────────\n# 📊 Disk Usage: Show human-readable sizes, sorted  \n# ────────────────────────────────────────────────────\nalias lu=\"du --summarize --human-readable * | sort --human-numeric-sort\"\n```\n\n```zsh\nreorder_files_with_regex_pattern() {\n    file_list=()\n    while IFS= read -r file; do\n        file_list+=(\"$file\")\n    done \u003c \u003c(ls -1 | sort)\n    total_count=${#file_list[@]}\n    total_count_digits=${#total_count}\n    counter=1\n    for file in $file_list; do\n        printf \"[%0${total_count_digits}d]-%s\\n\" $counter \"$file\"\n        ((counter++))\n    done\n}\n```\n\nExample:\n```plaintext\n# \u003e reorder_files_with_regex_pattern \n# [01]-Belgeler\n# [02]-Genel\n# [03]-İndirilenler\n# [04]-Masaüstü\n# [05]-Müzik\n# [06]-Resimler\n# [07]-Şablonlar\n# [08]-Videolar\n# [09]-VirtualBox_VMs\n# [10]-example.sh\n```\n\n```zsh\nreorder_and_rename_files_with_regex_pattern() {\n    file_list=()\n    while IFS= read -r file; do\n        file_list+=(\"$file\")\n    done \u003c \u003c(ls -1 | sort)\n    total_count=${#file_list[@]}\n    total_count_digits=${#total_count}\n    counter=1\n    for file in $file_list; do\n        new_name=$(printf \"[%0${total_count_digits}d]-%s\" $counter \"$file\")\n        mv -i \"$file\" \"$new_name\"\n        ((counter++))\n    done\n}\n```\n\nExample:\n```plaintext\n# \u003e reorder_and_rename_files_with_regex_pattern\n# yeniden adlandırıldı: 'Belgeler' -\u003e '[01]-Belgeler'\n# yeniden adlandırıldı: 'Genel' -\u003e '[02]-Genel'\n# yeniden adlandırıldı: 'İndirilenler' -\u003e '[03]-İndirilenler'\n# yeniden adlandırıldı: 'Masaüstü' -\u003e '[04]-Masaüstü'\n# yeniden adlandırıldı: 'Müzik' -\u003e '[05]-Müzik'\n# yeniden adlandırıldı: 'Resimler' -\u003e '[06]-Resimler'\n# yeniden adlandırıldı: 'Şablonlar' -\u003e '[07]-Şablonlar'\n# yeniden adlandırıldı: 'Videolar' -\u003e '[08]-Videolar'\n# yeniden adlandırıldı: 'VirtualBox_VMs' -\u003e '[09]-VirtualBox_VMs'\n# yeniden adlandırıldı: 'example.sh' -\u003e '[10]-example.sh'\n```\n\n```zsh\nrename_files_with_pattern_removed() {\n    for file in *; do\n        # Eğer dosya adı başında [number]- varsa\n        if [[ \"$file\" =~ ^\\[[0-9]+\\]- ]]; then\n            original_name=$(echo \"$file\" | sed 's/^\\[[0-9]\\+\\]-//')\n            mv --interactive \"$file\" \"$original_name\"\n        fi\n    done\n}\n```\n\nExample:\n```plaintext\n# \u003e rename_files_with_pattern_removed\n# yeniden adlandırıldı: '[01]-Belgeler' -\u003e 'Belgeler'\n# yeniden adlandırıldı: '[02]-Genel' -\u003e 'Genel'\n# yeniden adlandırıldı: '[03]-İndirilenler' -\u003e 'İndirilenler'\n# yeniden adlandırıldı: '[04]-Masaüstü' -\u003e 'Masaüstü'\n# yeniden adlandırıldı: '[05]-Müzik' -\u003e 'Müzik'\n# yeniden adlandırıldı: '[06]-Resimler' -\u003e 'Resimler'\n# yeniden adlandırıldı: '[07]-Şablonlar' -\u003e 'Şablonlar'\n# yeniden adlandırıldı: '[08]-Videolar' -\u003e 'Videolar'\n# yeniden adlandırıldı: '[09]-VirtualBox_VMs' -\u003e 'VirtualBox_VMs'\n# yeniden adlandırıldı: '[10]-example.sh' -\u003e 'example.sh'\n```\n\n```zsh\n# ---------------------------\n# Codium Profiles\n# ---------------------------\nalias       codium_shell=\"codium -n --profile Shell_Scripting\" # Launch with Shell_Scripting Profile\nalias          codium_md=\"codium -n --profile Markdown\"        # Launch with Markdown Profile\nalias codium_web_artisan=\"codium -n --profile Laravel\"         # Launch with Laravel Profile\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazizemir%2Fzshrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazizemir%2Fzshrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazizemir%2Fzshrc/lists"}