From ba15324849ab477d961b7c97bd528b43db39fd71 Mon Sep 17 00:00:00 2001 From: Maytham Date: Thu, 30 May 2024 21:37:05 +0800 Subject: [PATCH] Remove shebangs from completions (#980) Shebangs are only used for scripts that are intended to be executed, but completions are meant to be sourced by the shell, and so shebangs are not required. I've also renamed the completions so that editors can continue to detect the correct file format. --- CMakeLists.txt | 4 ++-- completions/{bash => fastfetch.bash} | 2 -- completions/{fish => fastfetch.fish} | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) rename completions/{bash => fastfetch.bash} (99%) rename completions/{fish => fastfetch.fish} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12e443121..1e1d251ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1158,13 +1158,13 @@ install( ) install( - FILES "${CMAKE_SOURCE_DIR}/completions/bash" + FILES "${CMAKE_SOURCE_DIR}/completions/${CMAKE_PROJECT_NAME}.bash" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/bash-completion/completions" RENAME "${CMAKE_PROJECT_NAME}" ) install( - FILES "${CMAKE_SOURCE_DIR}/completions/fish" + FILES "${CMAKE_SOURCE_DIR}/completions/${CMAKE_PROJECT_NAME}.fish" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/fish/vendor_completions.d" RENAME "${CMAKE_PROJECT_NAME}.fish" ) diff --git a/completions/bash b/completions/fastfetch.bash similarity index 99% rename from completions/bash rename to completions/fastfetch.bash index 9ae14e00d..93405ec61 100644 --- a/completions/bash +++ b/completions/fastfetch.bash @@ -1,5 +1,3 @@ -#!/usr/bin/env bash - __fastfetch_complete_help() { local __ff_helps=( diff --git a/completions/fish b/completions/fastfetch.fish similarity index 99% rename from completions/fish rename to completions/fastfetch.fish index 811e4099b..90ab32bdb 100755 --- a/completions/fish +++ b/completions/fastfetch.fish @@ -1,5 +1,3 @@ -#!/usr/bin/env fish - if not type -q fastfetch exit end