commit da19c68595f4901537631f19fe5b1dc6caac3b58
parent 952ad1181c55b21bdfff7d996fcb1dc11ffc8fba
Author: Sean Enck <sean@ttypty.com>
Date: Sun, 3 Sep 2023 06:31:25 -0400
collapse completion logic
Diffstat:
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/internal/app/doc/bash b/internal/app/doc/bash
@@ -16,12 +16,9 @@ _{{ $.Executable }}() {
opts="{{ $.HelpAdvancedCommand }}"
;;
{{- if not $.ReadOnly }}
- "{{ $.InsertCommand }}" | "{{ $.MultiLineCommand }}")
+ "{{ $.InsertCommand }}" | "{{ $.MultiLineCommand }}" | "{{ $.MoveCommand }}" | "{{ $.RemoveCommand }}")
opts="$opts $({{ $.DoList }})"
;;
- "{{ $.MoveCommand }}")
- opts=$({{ $.DoList }})
- ;;
{{- end}}
{{- if $.CanTOTP }}
"{{ $.TOTPCommand }}")
@@ -31,7 +28,7 @@ _{{ $.Executable }}() {
{{- end}}
;;
{{- end}}
- "{{ $.ShowCommand }}" | "{{ $.JSONCommand }}" {{ if not $.ReadOnly }}| "{{ $.RemoveCommand }}" {{end}} {{ if $.CanClip }} | "{{ $.ClipCommand }}" {{end}})
+ "{{ $.ShowCommand }}" | "{{ $.JSONCommand }}"{{ if $.CanClip }} | "{{ $.ClipCommand }}" {{end}})
opts=$({{ $.DoList }})
;;
esac
diff --git a/internal/app/doc/zsh b/internal/app/doc/zsh
@@ -21,7 +21,7 @@ _{{ $.Executable }}() {
fi
;;
{{- if not $.ReadOnly }}
- "{{ $.InsertCommand }}" | "{{ $.MultiLineCommand }}")
+ "{{ $.InsertCommand }}" | "{{ $.MultiLineCommand }}" | "{{ $.RemoveCommand }}")
if [ "$len" -eq 3 ]; then
compadd "$@" $({{ $.DoList }})
fi
@@ -51,7 +51,7 @@ _{{ $.Executable }}() {
esac
;;
{{- end}}
- "{{ $.ShowCommand }}" | "{{ $.JSONCommand }}" {{ if not $.ReadOnly }}| "{{ $.RemoveCommand }}" {{end}} {{ if $.CanClip }} | "{{ $.ClipCommand }}" {{end}})
+ "{{ $.ShowCommand }}" | "{{ $.JSONCommand }}"{{ if $.CanClip }} | "{{ $.ClipCommand }}" {{end}})
if [ "$len" -eq 3 ]; then
compadd "$@" $({{ $.DoList }})
fi