From f65d8a25bf64612b8b8414a02730c6cc2706aa7e Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 16 May 2023 10:47:24 +0300 Subject: [PATCH] Updated for case-sensitive --- configs/slpkg.toml | 6 +++--- man/slpkg.1 | 2 +- slpkg/configs.py | 4 ++-- slpkg/main.py | 16 ++++++++-------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/configs/slpkg.toml b/configs/slpkg.toml index 1de6e1cb..8b5fd75b 100644 --- a/configs/slpkg.toml +++ b/configs/slpkg.toml @@ -55,9 +55,9 @@ PROGRESS_SPINNER = "pixel" # Default is green. [green/violet/yellow/blue/cyan/grey/red] SPINNER_COLOR = "green" -# Enable or disable case-insensitive pattern matching. -# Default is false. [true/false] -CASE_INSENSITIVE = false +# Enable or disable case-sensitive pattern matching. +# Default is true. [true/false] +CASE_SENSITIVE = true # Slackware command for install packages, instead, you can use 'installpkg'. # Normally upgradepkg only upgrades packages that are already installed diff --git a/man/slpkg.1 b/man/slpkg.1 index 7c325081..3d173190 100644 --- a/man/slpkg.1 +++ b/man/slpkg.1 @@ -182,7 +182,7 @@ Download files in parallel to speed up the process. .P .B -m, --no-case .RS -Case-insensitive pattern matching packages. +Case-sensitive pattern matching packages. (to be used with: -b, build, -i, install, -d, download, -s, search, -f, find, -w, view, -t, tracking, -e, dependees) .RE .P diff --git a/slpkg/configs.py b/slpkg/configs.py index 954380ca..5cb82f7e 100644 --- a/slpkg/configs.py +++ b/slpkg/configs.py @@ -46,7 +46,7 @@ class Configs: spinning_bar: str = True progress_spinner: str = 'pixel' spinner_color: str = 'green' - case_insensitive: bool = False + case_sensitive: bool = True proxy_address: str = str() proxy_username: str = str() @@ -83,7 +83,7 @@ class Configs: spinning_bar: str = config['SPINNING_BAR'] progress_spinner: str = config['PROGRESS_SPINNER'] spinner_color: str = config['SPINNER_COLOR'] - case_insensitive: bool = config['CASE_INSENSITIVE'] + case_sensitive: bool = config['CASE_SENSITIVE'] proxy_address: str = config['PROXY_ADDRESS'] proxy_username: str = config['PROXY_USERNAME'] proxy_password: str = config['PROXY_PASSWORD'] diff --git a/slpkg/main.py b/slpkg/main.py index 36f54bd5..7bd88c90 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -616,7 +616,7 @@ class Argparse(Configs): self.check.is_database_empty() packages: list = self.is_file_list_packages() - if self.utils.is_option(self.flag_no_cases, self.flags) or self.case_insensitive: + if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive: packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data) if self.utils.is_option(self.flag_searches, self.flags): @@ -643,7 +643,7 @@ class Argparse(Configs): self.check.is_database_empty() packages: list = self.is_file_list_packages() - if self.utils.is_option(self.flag_no_cases, self.flags) or self.case_insensitive: + if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive: packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data) if self.utils.is_option(self.flag_searches, self.flags): @@ -668,7 +668,7 @@ class Argparse(Configs): self.check.is_database_empty() packages: list = self.is_file_list_packages() - if self.utils.is_option(self.flag_no_cases, self.flags) or self.case_insensitive: + if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive: packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data) if self.utils.is_option(self.flag_searches, self.flags): @@ -703,7 +703,7 @@ class Argparse(Configs): self.check.is_database_empty() packages: list = self.is_file_list_packages() - if self.utils.is_option(self.flag_no_cases, self.flags) or self.case_insensitive: + if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive: packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data) if self.utils.is_option(self.flag_searches, self.flags): @@ -721,7 +721,7 @@ class Argparse(Configs): self.check.is_database_empty() packages: list = self.is_file_list_packages() - if self.utils.is_option(self.flag_no_cases, self.flags) or self.case_insensitive: + if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive: packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data) if self.utils.is_option(self.flag_searches, self.flags): @@ -745,7 +745,7 @@ class Argparse(Configs): self.check.is_database_empty() packages: list = self.is_file_list_packages() - if self.utils.is_option(self.flag_no_cases, self.flags) or self.case_insensitive: + if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive: packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data) if self.utils.is_option(self.flag_searches, self.flags): @@ -763,7 +763,7 @@ class Argparse(Configs): self.check.is_database_empty() packages: list = self.is_file_list_packages() - if self.utils.is_option(self.flag_no_cases, self.flags) or self.case_insensitive: + if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive: packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data) if self.utils.is_option(self.flag_searches, self.flags): @@ -783,7 +783,7 @@ class Argparse(Configs): self.check.is_database_empty() packages: list = self.is_file_list_packages() - if self.utils.is_option(self.flag_no_cases, self.flags) or self.case_insensitive: + if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive: packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data) if self.utils.is_option(self.flag_searches, self.flags):