mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
merge
This commit is contained in:
parent
a8c56f5231
commit
8274156fae
296 changed files with 6279 additions and 3141 deletions
|
|
@ -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
|
||||
|
||||

|
||||

|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||
|
||||
eval '
|
||||
function acs(){
|
||||
function als(){
|
||||
(( $+commands[python3] )) || {
|
||||
echo "[error] No python executable detected"
|
||||
return
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue