diff options
Diffstat (limited to 'plugins/aliases')
-rw-r--r-- | plugins/aliases/README.md | 12 | ||||
-rw-r--r-- | plugins/aliases/aliases.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/aliases/cheatsheet.py | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/aliases/README.md b/plugins/aliases/README.md index 6a2da3d74..14f9c5c53 100644 --- a/plugins/aliases/README.md +++ b/plugins/aliases/README.md @@ -15,14 +15,14 @@ Requirements: Python needs to be installed. ## Usage -- `acs`: show all aliases by group +- `als`: show all aliases by group -- `acs -h/--help`: print help mesage +- `als -h/--help`: print help message -- `acs <keyword(s)>`: filter and highlight aliases by `<keyword>` +- `als <keyword(s)>`: filter and highlight aliases by `<keyword>` -- `acs -g <group>/--group <group>`: show only aliases for group `<group>`. Multiple uses of the flag show all groups +- `als -g <group>/--group <group>`: show only aliases for group `<group>`. Multiple uses of the flag show all groups -- `acs --groups`: show only group names +- `als --groups`: show only group names - ![screenshot](https://cloud.githubusercontent.com/assets/3602957/11581913/cb54fb8a-9a82-11e5-846b-5a67f67ad9ad.png) + ![screenshot](https://github.com/ohmyzsh/ohmyzsh/assets/66907184/5bfa00ea-5fc3-4e97-8b22-2f74f6b948c7) diff --git a/plugins/aliases/aliases.plugin.zsh b/plugins/aliases/aliases.plugin.zsh index 9864de957..7f1ba83b8 100644 --- a/plugins/aliases/aliases.plugin.zsh +++ b/plugins/aliases/aliases.plugin.zsh @@ -4,7 +4,7 @@ 0="${${(M)0:#/*}:-$PWD/$0}" eval ' - function acs(){ + function als(){ (( $+commands[python3] )) || { echo "[error] No python executable detected" return diff --git a/plugins/aliases/cheatsheet.py b/plugins/aliases/cheatsheet.py index f742fba9e..61bf5f956 100644 --- a/plugins/aliases/cheatsheet.py +++ b/plugins/aliases/cheatsheet.py @@ -57,7 +57,7 @@ def pretty_print(cheatsheet, wfilter, group_list=None, groups_only=False): pretty_print_group(key, [ alias for alias in aliases if alias[0].find(wfilter)>-1 or alias[1].find(wfilter)>-1], wfilter) if __name__ == '__main__': - parser = argparse.ArgumentParser(description="Pretty print aliases.", prog="acs") + parser = argparse.ArgumentParser(description="Pretty print aliases.", prog="als") parser.add_argument('filter', nargs="*", metavar="<keyword>", help="search aliases matching keywords") parser.add_argument('-g', '--group', dest="group_list", action='append', help="only print aliases in given groups") parser.add_argument('--groups', dest='groups_only', action='store_true', help="only print alias groups") |