Compare commits

..

3 Commits

Author SHA1 Message Date
ge
50fd9c7a9d fix duplicates in labels list 2024-10-20 09:00:19 +03:00
ge
c62213c8ff add strip cflag 2024-10-20 08:26:57 +03:00
ge
434c8f43dc fix executable path 2024-10-20 07:26:24 +03:00
3 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ dev:
v -o pt src/
prod:
v -prod -cc gcc -cflags -static -o pt src/ \
v -prod -cc gcc -cflags '-static -s' -o pt src/ \
-d pt_version=$(PT_VERSION) \
-d pt_piddir=pt \
-d pt_max_recursion_depth=10 \

View File

@ -11,13 +11,13 @@ _pt_completions()
;;
-l|-label)
if [[ ${COMP_WORDS[*]} =~ start ]]; then
COMPREPLY+=($(compgen -W "$(./pt labels)" -- "$cur"))
COMPREPLY+=($(compgen -W "$(pt labels)" -- "$cur"))
fi
;;
*)
local words=($(./pt ls -o brief) start stop signal)
local words=($(pt ls -o brief) start stop signal)
if [[ ${words[*]} =~ $prev ]]; then
COMPREPLY+=($(compgen -W "$(./pt ls -o brief)" -- "$cur"))
COMPREPLY+=($(compgen -W "$(pt ls -o brief)" -- "$cur"))
fi
local commands='start stop ls ps help version signal labels'
local invoked=()

View File

@ -19,7 +19,7 @@ fn (em EntryManager) labels() []string {
for _, val in em.config.entries {
labels << val.labels
}
return arrays.uniq(labels)
return arrays.uniq(labels.sorted())
}
fn (em EntryManager) by_labels(labels []string) []Entry {