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.

37 lines
1.5 KiB

3 years ago
  1. # Perl
  2. This plugin adds [perl](https://www.perl.org/) useful aliases/functions.
  3. To use it, add `perl` to the plugins array in your zshrc file:
  4. ```zsh
  5. plugins=(... perl)
  6. ```
  7. ## Aliases
  8. | Aliases | Command | Description |
  9. | :------------ | :----------------- | :------------------------------------- |
  10. | pbi | `perlbrew install` | Install specific perl version |
  11. | pbl | `perlbrew list` | List all perl version installed |
  12. | pbo | `perlbrew off` | Go back to the system perl |
  13. | pbs | `perlbrew switch` | Turn it back on |
  14. | pbu | `perlbrew use` | Use specific version of perl |
  15. | pd | `perldoc` | Show the perl documentation |
  16. | ple | `perl -wlne` | Use perl like awk/sed |
  17. | latest-perl | `curl ...` | Show the latest stable release of Perl |
  18. ## Functions
  19. * `newpl`: creates a basic Perl script file and opens it with $EDITOR.
  20. * `pgs`: Perl Global Substitution: `pgs <find_pattern> <replace_pattern> <filename>`
  21. Looks for `<find_pattern>` and replaces it with `<replace_pattern>` in `<filename>`.
  22. * `prep`: Perl grep, because 'grep -P' is terrible: `prep <pattern> [<filename>]`
  23. Lets you work with pipes or files (if no `<filename>` provided, use stdin).
  24. ## Requirements
  25. In order to make this work, you will need to have perl installed.
  26. More info on the usage and install: https://www.perl.org/get.html