{"id":13469242,"url":"https://github.com/djui/alias-tips","last_synced_at":"2025-03-26T06:32:00.540Z","repository":{"id":19860421,"uuid":"23123651","full_name":"djui/alias-tips","owner":"djui","description":"An oh-my-zsh plugin to help remembering those aliases you defined once","archived":false,"fork":false,"pushed_at":"2023-06-08T03:59:31.000Z","size":80,"stargazers_count":785,"open_issues_count":18,"forks_count":50,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-29T23:54:55.234Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/djui.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}},"created_at":"2014-08-19T19:51:10.000Z","updated_at":"2024-10-22T10:39:24.000Z","dependencies_parsed_at":"2024-01-03T04:15:44.562Z","dependency_job_id":"8b420076-9844-4fe3-b497-0e426633ed35","html_url":"https://github.com/djui/alias-tips","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djui%2Falias-tips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djui%2Falias-tips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djui%2Falias-tips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djui%2Falias-tips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djui","download_url":"https://codeload.github.com/djui/alias-tips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245604026,"owners_count":20642928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-07-31T15:01:30.258Z","updated_at":"2025-03-26T06:32:00.119Z","avatar_url":"https://github.com/djui.png","language":"Python","readme":"# alias-tips\n\n[![Build Status](https://travis-ci.org/djui/alias-tips.svg)](https://travis-ci.org/djui/alias-tips)\n\nA Zsh plugin to help remembering those shell aliases and Git aliases you once\ndefined.\n\nWorks with [Oh My Zsh](#oh-my-zsh), [Fig](#fig), [zplug](#zplug), [antigen](#antigen), [zgen](#zgen), [Arch Linux](#arch-linux), or [pure Zsh](#zsh).\n\nIt works by trying to find an shell or Git alias for the command you are\ncurrently executing and printing a help line reminding you about that alias.\n\nThe idea is that you might be too afraid to execute aliases defined because you\ncan't remember them correctly, or just have forgotten about some aliases, or\nthat aliases for your daily commands even exist.\n\n\n# Example\n\n```sh\n$ ls -lh\nAlias tip: ll\n:\n\n$ git gui\nAlias tip: gg\n:\n\n$ git rebase --interactive master\nAlias tip: grbi master\n:\n\n$ git status\nAlias tip: g st\n:\n```\n\n\n# Installation\n\n## [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh)\n\n1. Get it\n\n    Go to your custom plugins folder:\n\n    ```sh\n    cd ${ZSH_CUSTOM1:-$ZSH/custom}/plugins\n    ```\n\n    Then either clone:\n\n    ```sh\n    git clone https://github.com/djui/alias-tips.git\n    ```\n\n    Or download:\n\n    ```sh\n    wget https://github.com/djui/alias-tips/archive/master.zip\n    unzip master.zip \u0026\u0026 mv alias-tips-master alias-tips \u0026\u0026 rm master.zip\n    ```\n\n    Or add it as submodule:\n\n    ```sh\n    git submodule add https://github.com/djui/alias-tips\n    git submodule update --init\n    ```\n\n2. Include it\n\n    Then add the plugin to your plugin list in oh-my-zsh configuration:\n\n    ```sh\n    $EDITOR ~/.zshrc\n\n    # -plugins=(...)\n    # +plugins=(... alias-tips)\n    ```\n\n\n## Fig\n\n[Fig](https://fig.io) adds apps, shortcuts, and autocomplete to your existing terminal.\n\nInstall `alias-tips` in just one click.\n\n\u003ca href=\"https://fig.io/plugins/other/alias-tips_djui\" target=\"_blank\"\u003e\u003cimg src=\"https://fig.io/badges/install-with-fig.svg\" /\u003e\u003c/a\u003e\n\n\n## [zplug](https://github.com/zplug/zplug)\n\n1. Add `zplug \"djui/alias-tips\"` to your `.zshrc`\n2. Install it with `zplug install`\n\n\n## [Antigen](https://github.com/zsh-users/antigen)\n\n1. Add `antigen bundle djui/alias-tips` to your `.zshrc` with your other antigen\n   bundle commands.\n\n\n## [zgen](https://github.com/tarjoilija/zgen)\n\n1. Add `zgen load djui/alias-tips` to your `.zshrc`\n2. Regenerate your `init.zsh` with `zgen save`\n\n\n## Arch Linux\n\n1. Install [`alias-tips-git`](https://aur.archlinux.org/packages/alias-tips-git/) from the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository).\n\n2. Add the following to your `.zshrc`:\n\n    ```sh\n    source /usr/share/zsh/plugins/alias-tips/alias-tips.plugin.zsh\n    ```\n\n3. Start a new terminal session.\n\n\n## Zsh\n\n1. 1. Get it `git clone https://github.com/djui/alias-tips.git ~/.zsh/alias-tips`\n2. Add `source alias-tips/alias-tips.plugin.zsh` to your `.zshrc`.\n\n\n# Usage\n\nAfter installation re-source your `.zshrc`.\n\n\n## Customizations\n\n### Customize the Output\n\nThe help string can be configured exporting an environment variable, e.g. in\nyour `.zshrc`:\n\n```sh\n:\nexport ZSH_PLUGINS_ALIAS_TIPS_TEXT=\"Alias tip: \"\n:\n```\n\n\n### Exclude some Aliases\n\nA list of aliases to be excluded from being reminded of can be configured\nexporting an environment variable of space separated aliases, e.g. in your\n`.zshrc`:\n\n```sh\n:\nexport ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES=\"_ ll vi\"\n:\n```\n\n\n### Disable Command Expansion\n\nIf you have several alias, e.g. for different git commands the command get\nexpanded before looking for an alias.\n\nExample:\n\n```sh\nalias gRv='git remote -v'\nalias gR='git remote'\n```\n\nWithout the expand option `gR -v` will execute without a tip, with expand, it\nwill suggest `gRv`.\n\nIf this may not be desired, the behaviour can be disabled by setting the\nenvironment variable, e.g. in your .zshrc:\n\n```sh\n:\nexport ZSH_PLUGINS_ALIAS_TIPS_EXPAND=0\n:\n```\n\n\n### Force Alias Use\n\nIf you want to force yourself to use the aliases you set you can enable this\noption through this environmental variable:\n\n```sh\n:\nexport ZSH_PLUGINS_ALIAS_TIPS_FORCE=1\n:\n```\n\nThis will cause alias-tips to abort the command you have entered if there exists\nan alias for it.\n\n\n### Reveal Command\n\nIf you want to reveal aliased command, e.g. to demonstrate your shell to someone else\nyou can enable this option through this environmental variable:\n\n```sh\n:\nexport ZSH_PLUGINS_ALIAS_TIPS_REVEAL=1\n:\n```\n\nUse this environmental variable to customize text:\n\n``````sh\n:\nexport ZSH_PLUGINS_ALIAS_TIPS_REVEAL_TEXT=\"Alias tip: \"\n:\n``````\n\nAnd this to exclude some obvious expansions:\n\n``````sh\n:\nexport ZSH_PLUGINS_ALIAS_TIPS_REVEAL_EXCLUDES=(_ ll vi)\n:\n``````\n\n\n\n# Limitations\n\n- *Suffix* and *Global* aliases are currently not supported. Only *Prefix*\n  aliases (\"command position\") are supported. Check the\n  [Zsh manual](http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Commands.html#Shell-Builtin-Commands)\n  on `alias` for their definition.\n- Multiline aliases (aliases which definition span multiple lines) are not\n  supported. Currently their first line only will be used (likely incorrectly)\n\n\n# FAQ\n\n**Q:** *Why only Zsh?*\n\n**A:** This works because of feature in Zsh called\n[preexec](http://zsh.sourceforge.net/Doc/Release/Functions.html). Other shells,\ne.g. Bash, do not have this feature. There are\nworkarounds[[1](https://github.com/rcaloras/bash-preexec),[2](http://www.twistedmatrix.com/users/glyph/preexec.bash.txt)]\nbut integrating these is a task left for the reader.\n\n\n# Testing\n\n    $ python  -m unittest test_alias-tips\n    $ python3 -m unittest test_alias-tips\n\n\n# Contributing\n\nSee: [CONTRIBUTIONS.md](CONTRIBUTIONS.md).\n","funding_links":[],"categories":["Python","Plugins"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjui%2Falias-tips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjui%2Falias-tips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjui%2Falias-tips/lists"}