mirror of
https://invent.kde.org/system/dolphin
synced 2024-07-04 17:30:55 +00:00
Add zsh completions
Completes all non-generic-Qt options listed in --help output. Note: it uses the new variable KDE_INSTALL_ZSHAUTOCOMPLETEDIR, which was added in ECM 5.101. Read more: https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/310
This commit is contained in:
parent
a19f29f4e5
commit
d55099ad47
|
@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
|
||||||
project(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
|
project(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
|
||||||
|
|
||||||
set(QT_MIN_VERSION "5.15.2")
|
set(QT_MIN_VERSION "5.15.2")
|
||||||
set(KF5_MIN_VERSION "5.92.0")
|
set(KF5_MIN_VERSION "5.101.0")
|
||||||
|
|
||||||
# ECM setup
|
# ECM setup
|
||||||
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
|
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
|
||||||
|
@ -206,5 +206,7 @@ if(KF5DocTools_FOUND)
|
||||||
kdoctools_install(po)
|
kdoctools_install(po)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
install(FILES completions/dolphin.zsh RENAME _dolphin DESTINATION ${KDE_INSTALL_ZSHAUTOCOMPLETEDIR})
|
||||||
|
|
||||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|
||||||
|
|
18
completions/dolphin.zsh
Normal file
18
completions/dolphin.zsh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#compdef dolphin
|
||||||
|
|
||||||
|
# SPDX-FileCopyrightText: 2022 ivan tkachenko <me@ratijas.tk>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'(* -)'{-h,--help}'[Displays help on commandline options]' \
|
||||||
|
'--select[The files and folders passed as arguments will be selected.]' \
|
||||||
|
'--split[Dolphin will get started with a split view.]' \
|
||||||
|
'--new-window[Dolphin will explicitly open in a new window.]' \
|
||||||
|
'--daemon[Start Dolphin Daemon (only required for DBus Interface).]' \
|
||||||
|
'*:: :_urls' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
return $ret
|
Loading…
Reference in New Issue
Block a user