diff --git a/slpkg/downloader.py b/slpkg/downloader.py index 9baaaa94..cf507d05 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -21,7 +21,7 @@ class Downloader(Configs, Utilities): self.path = path self.url = url self.flags = flags - self.flag_no_silent = ['-ns', '--no-silent'] + self.flag_no_silent = ['-o', '--no-silent'] self.filename = url.split('/')[-1] self.color = self.colour() self.bold = self.color['bold'] diff --git a/slpkg/main.py b/slpkg/main.py index e1c12c12..6bc43a13 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -49,23 +49,23 @@ class Argparse(Configs): self.flag_jobs = '--jobs' self.flag_short_jobs = '-j' self.flag_resolve_off = '--resolve-off' - self.flag_short_resolve_off = '-ro' + self.flag_short_resolve_off = '-L' self.flag_reinstall = '--reinstall' self.flag_short_reinstall = '-R' self.flag_skip_installed = '--skip-installed' - self.flag_short_skip_installed = '-si' + self.flag_short_skip_installed = '-k' self.flag_full_reverse = '--full-reverse' - self.flag_short_full_reverse = '-fr' + self.flag_short_full_reverse = '-E' self.flag_search = '--search' self.flag_short_search = '-S' self.flag_no_silent = '--no-silent' - self.flag_short_no_silent = '-ns' - self.flag_directory = '--directory=' - self.flag_short_directory = '-dir=' + self.flag_short_no_silent = '-o' self.flag_pkg_version = '--pkg-version' - self.flag_short_pkg_version = '-pv' + self.flag_short_pkg_version = '-p' + self.flag_directory = '--directory=' + self.flag_short_directory = '-e=' self.flag_file_pattern = '--file-pattern=' - self.flag_short_file_pattern = '-fp=' + self.flag_short_file_pattern = '-F=' self.flag_searches = [self.flag_short_search, self.flag_search] @@ -115,6 +115,13 @@ class Argparse(Configs): self.file_pattern = arg.split('=')[1] self.args[self.args.index(arg)] = self.flag_file_pattern + # Fixed for merge options if used, like: -yjR + for args in self.args: + if args.startswith('-') and len(args) > 2: + self.args.remove(args) + for arg in args[1:]: + self.flags.append(f'-{arg}') + for opt in self.options: if opt in self.args: self.args.remove(opt) diff --git a/slpkg/remove_packages.py b/slpkg/remove_packages.py index 392c2517..5f9a2390 100644 --- a/slpkg/remove_packages.py +++ b/slpkg/remove_packages.py @@ -32,8 +32,8 @@ class RemovePackages(Configs): self.dependencies = [] self.utils = Utilities() self.progress = ProgressBar() - self.flag_resolve_off = ['-ro', '--resolve-off'] - self.flag_no_silent = ['-ns', '--no-silent'] + self.flag_resolve_off = ['-L', '--resolve-off'] + self.flag_no_silent = ['-o', '--no-silent'] self.output = 0 self.remove_pkg = None self.stderr = None diff --git a/slpkg/slackbuild.py b/slpkg/slackbuild.py index d9478a79..4a6c4453 100644 --- a/slpkg/slackbuild.py +++ b/slpkg/slackbuild.py @@ -52,10 +52,10 @@ class Slackbuilds(Configs): self.byellow = f'{self.bold}{self.yellow}' self.bred = f'{self.bold}{self.red}' self.flag_reinstall = ['-R', '--reinstall'] - self.flag_skip_installed = ['-si', '--skip-installed'] - self.flag_resolve_off = ['-ro', '--resolve-off'] + self.flag_skip_installed = ['-k', '--skip-installed'] + self.flag_resolve_off = ['-L', '--resolve-off'] self.flag_jobs = ['-j', '--jobs'] - self.flag_no_silent = ['-ns', '--no-silent'] + self.flag_no_silent = ['-o', '--no-silent'] def execute(self): """ Starting build or install the slackbuilds. """ diff --git a/slpkg/tracking.py b/slpkg/tracking.py index fe7a4cdc..17125e6b 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -15,7 +15,7 @@ class Tracking(Configs, Utilities): super(Configs, self).__init__() super(Utilities, self).__init__() self.flags = flags - self.flag_pkg_version = ['-pv', '--pkg-version'] + self.flag_pkg_version = ['-p', '--pkg-version'] self.ascii = Ascii() self.llc = self.ascii.lower_left_corner self.hl = self.ascii.horizontal_line diff --git a/slpkg/views/cli_menu.py b/slpkg/views/cli_menu.py index 0f736c27..17afbef3 100644 --- a/slpkg/views/cli_menu.py +++ b/slpkg/views/cli_menu.py @@ -25,10 +25,10 @@ class Usage(Configs): f' slpkg [{self.cyan}COMMAND{self.endc}] [-b, build, -i, install, -d, download, -r, remove] \n' f' slpkg [{self.cyan}COMMAND{self.endc}] [-f, find, -w, view, -s, search] \n' f' slpkg [{self.cyan}COMMAND{self.endc}] [-e, dependees, -t, tracking] \n' - f' slpkg [{self.yellow}OPTIONS{self.endc}] [-y, --yes, -j, --jobs, -ro, --resolve-off, -R, --reinstall]\n' - f' slpkg [{self.yellow}OPTIONS{self.endc}] [-si, --skip-installed, -fr, --full-reverse, -S, --search]\n' - f' slpkg [{self.yellow}OPTIONS{self.endc}] [-ns, --no-silent, -dir=, --directory=PATH]\n' - f' slpkg [{self.yellow}OPTIONS{self.endc}] [-pv, --pkg-version, -fp=, --file-pattern=PATTERN]\n' + f' slpkg [{self.yellow}OPTIONS{self.endc}] [-y, --yes, -j, --jobs, -L, --resolve-off, -R, --reinstall]\n' + f' slpkg [{self.yellow}OPTIONS{self.endc}] [-k, --skip-installed, -E, --full-reverse, -S, --search]\n' + f' slpkg [{self.yellow}OPTIONS{self.endc}] [-o, --no-silent, -p, --pkg-version]\n' + f' slpkg [{self.yellow}OPTIONS{self.endc}] [-e, --directory=PATH, -F, --file-pattern=PATTERN]\n' " \nIf you need more information please try 'slpkg --help'.") print(args) @@ -59,15 +59,15 @@ class Usage(Configs): f'\n{self.bold}OPTIONS:{self.endc}\n' f' {self.yellow}-y, --yes{self.endc} Answer Yes to all questions.\n' f' {self.yellow}-j, --jobs{self.endc} Set it for multicore systems.\n' - f' {self.yellow}-ro, --resolve-off{self.endc} Turns off dependency resolving.\n' + f' {self.yellow}-L, --resolve-off{self.endc} Turns off dependency resolving.\n' f' {self.yellow}-R, --reinstall{self.endc} Upgrade packages of the same version.\n' - f' {self.yellow}-si, --skip-installed{self.endc} Skip installed packages.\n' - f' {self.yellow}-fr, --full-reverse{self.endc} Full reverse dependency.\n' + f' {self.yellow}-k, --skip-installed{self.endc} Skip installed packages.\n' + f' {self.yellow}-E, --full-reverse{self.endc} Full reverse dependency.\n' f' {self.yellow}-S, --search{self.endc} Search packages from the repository.\n' - f' {self.yellow}-ns, --no-silent{self.endc} Disable silent mode.\n' - f' {self.yellow}-dir=, --directory={self.endc}PATH Download files to a specific path.\n' - f' {self.yellow}-pv, --pkg-version{self.endc} Print the repository package version.\n' - f' {self.yellow}-fp=, --file-pattern={self.endc}PATTERN Include specific installed files.\n' + f' {self.yellow}-o, --no-silent{self.endc} Disable silent mode.\n' + f' {self.yellow}-p, --pkg-version{self.endc} Print the repository package version.\n' + f' {self.yellow}-e, --directory={self.endc}PATH Download files to a specific path.\n' + f' {self.yellow}-F, --file-pattern={self.endc}PATTERN Include specific installed files.\n' '\n -h, --help Show this message and exit.\n' ' -v, --version Print version and exit.\n' '\nEdit the configuration file in the /etc/slpkg/slpkg.toml \n' diff --git a/slpkg/views/view_package.py b/slpkg/views/view_package.py index c830a880..1cb582a5 100644 --- a/slpkg/views/view_package.py +++ b/slpkg/views/view_package.py @@ -17,7 +17,7 @@ class ViewPackage(Configs, Utilities): super(Configs, self).__init__() super(Utilities, self).__init__() self.flags = flags - self.flag_pkg_version = ['-pv', '--pkg-version'] + self.flag_pkg_version = ['-p', '--pkg-version'] self.session = Session def package(self, packages: list): diff --git a/slpkg/views/views.py b/slpkg/views/views.py index d87992ed..c56d0031 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -20,7 +20,7 @@ class ViewMessage(Configs): def __init__(self, flags: list): super(Configs, self).__init__() self.flags = flags - self.flag_resolve_off = ['-ro', '--resolve-off'] + self.flag_resolve_off = ['-L', '--resolve-off'] self.flag_reinstall = ['-R', '--reinstall'] self.flag_yes = ['-y', '--yes'] self.file_pattern = f'*{self.sbo_repo_tag}'