Skip to content

Commit

Permalink
feat: Add the --edit-config option to edit the arch-update.conf c…
Browse files Browse the repository at this point in the history
…onfiguration file (#209)

Add the `arch-update --edit-config` option to edit the currently used `arch-update.conf` configuration file.
It uses the editor defined in the `$EDITOR` environment variable or falls back to `nano` if the variable isn't set.

Closes #205
  • Loading branch information
Antiz96 committed Jul 8, 2024
1 parent 3df5849 commit 988ad2d
Show file tree
Hide file tree
Showing 10 changed files with 253 additions and 180 deletions.
2 changes: 2 additions & 0 deletions README-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ Options :
-D, --debug Afficher les traces de débogage
--gen-config Générer un fichier de configuration par défaut/exemple (voir la page de manuel arch-update.conf(5) pour plus de détails)
--show-config Afficher le fichier de configuration `arch-update.conf` actuellement utilisé (s'il existe)
--edit-config Editer le fichier de configuration `arch-update.conf` actuellement utilisé (s'il existe)
--tray Lancer l'applet systray d'Arch-Update, vous pouvez optionnellement ajouter l'argument `--enable` pour la démarrer automatiquement au démarrage du système.
-h, --help Afficher ce message d'aide et quitter
-V, --version Afficher les informations de version et quitter
Expand All @@ -183,6 +184,7 @@ Codes de sortie :
10 Erreur lors de la creation du fichier desktop autostart pour l'applet systray avec l'option `--tray --enable`
11 Erreur lors du redémarrage des services nécessitant un redémarrage après mise à jour
12 Erreur lors du traitement des fichiers pacnew
13 Erreur lors de l'édition du fichier de configuration avec l'option `--edit-config`
```

Pour plus d'informations, consultez la page de manuel arch-update(1).
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ Options:
-D, --debug Display debug traces
--gen-config Generate a default/example configuration file (see the arch-update.conf(5) man page for more details)
--show-config Display the `arch-update.conf` configuration file currently used (if it exists)
--edit-config Edit the `arch-update.conf` configuration file currently used (if it exists)
--tray Launch the Arch-Update systray applet, you can optionally add the `--enable` argument to start it automatically at boot.
-h, --help Display this help message and exit
-V, --version Display version information and exit
Expand All @@ -183,6 +184,7 @@ Exit Codes:
10 Error when creating the autostart desktop file for the systray applet with the `--tray --enable` option
11 Error when restarting services that require a post upgrade restart
12 Error during the pacnew files processing
13 Error when editing the configuration file with the `--edit-config` option
```

For more information, see the arch-update(1) man page.
Expand Down
8 changes: 8 additions & 0 deletions doc/man/arch-update.1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Display debug traces.
.B \-\-show\-config
.RB "Display the " "arch-update.conf " "configuration file currently used (if it exists)."

.TP
.B \-\-edit\-config
.RB "Edit the " "arch-update.conf " "configuration file currently used (if it exists)."

.TP
.B \-\-tray
Start the Arch-Update systray applet.
Expand Down Expand Up @@ -235,6 +239,10 @@ Error when restarting services that require a post upgrade restart
.B 12
Error during the pacnew files processing

.TP
.B 13
.RB "Error when editing the configuration file with the " "--edit-config " "option"

.SH SEE ALSO
.BR checkupdates (8),
.BR pacman (8),
Expand Down
8 changes: 8 additions & 0 deletions doc/man/fr/arch-update.1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Afficher les traces de débogage.
.B \-\-show\-config
.RB "Afficher le fichier de configuration " "arch-update.conf " "actuellement utilisé (s'il existe)."

.TP
.B \-\-edit\-config
.RB "Editer le fichier de configuration " "arch-update.conf " "actuellement utilisé (s'il existe)."

.TP
.B \-\-tray
Démarrer l'applet systray d'Arch-Update.
Expand Down Expand Up @@ -235,6 +239,10 @@ Erreur lors du redémarrage des services nécessitant un redémarrage après mis
.B 12
Erreur lors du traitement des fichiers pacnew

.TP
.B 13
.RB "Erreur lors de l'édition du fichier de configuration avec l'option " "--edit-config"

.SH VOIR AUSSI
.BR checkupdates (8),
.BR pacman (8),
Expand Down
Loading

0 comments on commit 988ad2d

Please sign in to comment.