aboutsummaryrefslogtreecommitdiff
path: root/operators/inline_none.zsh
blob: f6ac372c82c569fc85e8e1f35d2d24be0cb1eb0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright (C) 2024-2026 Maria Lisina
# Copyright (C) 2024-2026 Danil Lisin
# SPDX-License-Identifier: Apache-2.0

until mkdir "${user_config}.lock"
do
    sleep 1
done

shorts_config="${user_config}/shorts"

if [[ -d "${shorts_config}" ]]
then
    shorts=($(ls -1 "${shorts_config}"))
fi

if [[ ${#shorts} -gt 0 ]]
then
    command="shorts"
else
    command="help"
fi

rmdir "${user_config}.lock"