my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

3 years ago
  1. # alias-finder plugin
  2. This plugin searches the defined aliases and outputs any that match the command inputted. This makes learning new aliases easier.
  3. To use it, add `alias-finder` to the `plugins` array of your zshrc file:
  4. ```
  5. plugins=(... alias-finder)
  6. ```
  7. ## Usage
  8. To see if there is an alias defined for the command, pass it as an argument to `alias-finder`. This can also run automatically before each command you input - add `ZSH_ALIAS_FINDER_AUTOMATIC=true` to your zshrc if you want this.
  9. ## Options
  10. - Use `--longer` or `-l` to allow the aliases to be longer than the input (match aliases if they contain the input).
  11. - Use `--exact` or `-e` to avoid matching aliases that are shorter than the input.
  12. ## Examples
  13. ```
  14. $ alias-finder "git pull"
  15. gl='git pull'
  16. g=git
  17. ```
  18. ```
  19. $ alias-finder "web_search google oh my zsh"
  20. google='web_search google'
  21. ```
  22. ```
  23. $ alias-finder "git commit -v"
  24. gc="git commit -v"
  25. g=git
  26. ```
  27. ```
  28. $ alias-finder -e "git commit -v"
  29. gc='git commit -v'
  30. ```
  31. ```
  32. $ alias-finder -l "git commit -v"
  33. gc='git commit -v'
  34. 'gc!'='git commit -v --amend'
  35. gca='git commit -v -a'
  36. 'gca!'='git commit -v -a --amend'
  37. 'gcan!'='git commit -v -a --no-edit --amend'
  38. 'gcans!'='git commit -v -a -s --no-edit --amend'
  39. 'gcn!'='git commit -v --no-edit --amend'
  40. ```