From a8f00c4ba919bfe398b0d3aee2135e8497dde247 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 7 Aug 2018 01:45:33 -0700 Subject: [PATCH] Update zsh completion files in doc/zsh (#10970) --- doc/zsh/_r2 | 6 ++++-- doc/zsh/_rabin2 | 2 +- doc/zsh/_radiff2 | 2 +- doc/zsh/_rafind2 | 1 + doc/zsh/_ragg2 | 2 +- doc/zsh/_rax2 | 2 ++ 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/zsh/_r2 b/doc/zsh/_r2 index 777151c117..5ad2bf416e 100644 --- a/doc/zsh/_r2 +++ b/doc/zsh/_r2 @@ -10,6 +10,7 @@ _r2() { local -a options=( '-\=[perform !=! command to run all commands remotely]' '-0[print \x00 after init and every command]' + '-2[close stderr (silent warnings)]' '-a+[set asm.arch]: :->arch' "-A[run 'aaa' command to analyze all referenced code]" '-b+[set asm.bits]:bits:(8 16 32 64)' @@ -47,6 +48,7 @@ _r2() { '(-v -V)-v[show radare2 version]' '(-v -V)-V[show radare2 and lib versions)]' '-w[open file in write mode]' + '-x[open without exec-flag, see io.exec]' '(-z -zz)-z[do not load strings]' '(-z -zz)-zz[load strings from raw binary (even if unknown)]' ) @@ -55,7 +57,7 @@ _r2() { case $state in arch) - local -a sub=(${(f)"$(r2_qc 'e asm.arch=?~[2,4-99]' | sed -E 's/ (.*)/[\1]/')"}) + local -a sub=(${(f)"$(r2_qc 'e asm.arch=?')"}) _values 'arch' $sub && ret=0 ;; asm.os) @@ -69,7 +71,7 @@ _r2() { _values 'dbg.backend' $(r2 '-D?') && ret=0 ;; project) - _values 'project' $(r2 -p) && ret=0 + _values 'project' "${(f)"$(r2 -p)"}" && ret=0 ;; esac return ret diff --git a/doc/zsh/_rabin2 b/doc/zsh/_rabin2 index 2af6d236bc..d5f4c0180f 100644 --- a/doc/zsh/_rabin2 +++ b/doc/zsh/_rabin2 @@ -64,7 +64,7 @@ _rabin2() { case $state in arch) - local -a sub=(${(f)"$(r2_qc 'e asm.arch=?~[2,4-99]' | sed -E 's/ (.*)/[\1]/')"}) + local -a sub=(${(f)"$(r2_qc 'e asm.arch=?')"}) _values 'arch' $sub && ret=0 ;; checksum) diff --git a/doc/zsh/_radiff2 b/doc/zsh/_radiff2 index 68a8f62a8f..d8e74b88b8 100644 --- a/doc/zsh/_radiff2 +++ b/doc/zsh/_radiff2 @@ -42,7 +42,7 @@ _radiff2() { case $state in arch) - local -a sub=(${(f)"$(r2_qc 'e asm.arch=?~[2,4-99]' | sed -E 's/ (.*)/[\1]/')"}) + local -a sub=(${(f)"$(r2_qc 'e asm.arch=?')"}) _values 'arch' $sub && ret=0 ;; esac diff --git a/doc/zsh/_rafind2 b/doc/zsh/_rafind2 index 9f7443652d..23bf8dd7d8 100644 --- a/doc/zsh/_rafind2 +++ b/doc/zsh/_rafind2 @@ -12,6 +12,7 @@ _rafind2() { '-m[magic search, file-type carver]' '-M+[set a binary mask to be applied on keywords]:str' '-n[do not stop on read errors]' + '-q[quiet]' '-r[print using radare commands]' '*-s+[search for a specific string (can be used multiple times)]:str' '*-S+[search for a specific wide string (can be used multiple times)]:str' diff --git a/doc/zsh/_ragg2 b/doc/zsh/_ragg2 index 71fa34ba35..410818d91a 100644 --- a/doc/zsh/_ragg2 +++ b/doc/zsh/_ragg2 @@ -42,7 +42,7 @@ _ragg2() { case $state in arch) - local -a sub=(${(f)"$(r2_qc 'e asm.arch=?~[2,4-99]' | sed -E 's/ (.*)/[\1]/')"}) + local -a sub=(${(f)"$(r2_qc 'e asm.arch=?')"}) _values 'arch' $sub && ret=0 ;; asm.os) diff --git a/doc/zsh/_rax2 b/doc/zsh/_rax2 index ad5624d96b..fbf023aea6 100644 --- a/doc/zsh/_rax2 +++ b/doc/zsh/_rax2 @@ -12,8 +12,10 @@ _rax2() { '-f[floating point ; rax2 -f 6.3+2.1]' '-F[stdin slurp C hex ; rax2 -F < shellcode.c]' '-h[help ; rax2 -h]' + '-i[dump as C array ; rax2 -i < bytes]' '-k[keep base ; rax2 -k 33+3 -> 36]' '-K[randomart ; rax2 -K 0x34 1020304050]' + '-L[bin -> hex ; rax2 -L 1111111]' '-n[binary number ; rax2 -n 0x1234 # 34120000]' '-N[binary number ; rax2 -N 0x1234 # \x34\x12\x00\x00]' '-r[r2 style output ; rax2 -r 0x1234]'