File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
if command -q jq
2
- function __fish_dunstctl_history
3
- dunstctl history | jq -r ' .data[][] | "\ (.id .data)\ t\ (.appname .data)" '
2
+ function __fish_dunstctl_info
3
+ dunstctl $argv [1] | jq -r " .data[][] | \ " \(.$argv [2] .data)\t\(.$argv [3] .data)\" "
4
4
end
5
5
else
6
- function __fish_dunstctl_history
7
- dunstctl history | awk ' /"id" :/ {getline; getline; print $3}'
6
+ function __fish_dunstctl_info
7
+ dunstctl $argv [1] | awk -vpattern = " \" $argv [2] \" : " ' $0 ~ pattern {getline; getline; gsub(" \ "", "", $3) ; print $3}'
8
8
end
9
9
end
10
10
@@ -27,7 +27,7 @@ complete -c dunstctl -f -n __fish_use_subcommand -a help -d 'Show this help'
27
27
# command specific arguments
28
28
complete -c dunstctl -x -n ' __fish_seen_subcommand_from action close close-all context history history-clear is-paused debug help'
29
29
complete -c dunstctl -x -n ' __fish_seen_subcommand_from count' -a ' displayed history waiting'
30
- complete -c dunstctl -x -n ' __fish_seen_subcommand_from history-pop history-rm' -a ' (__fish_dunstctl_history )'
30
+ complete -c dunstctl -x -n ' __fish_seen_subcommand_from history-pop history-rm' -a ' (__fish_dunstctl_info history id appname )'
31
31
complete -c dunstctl -x -n ' __fish_seen_subcommand_from set-paused' -a ' true false toggle'
32
32
33
33
# TODO: add completion for rule when there is a proper way to get configured rules
You can’t perform that action at this time.
0 commit comments