https://bugs.kde.org/show_bug.cgi?id=432679

Albert Astals Cid <aa...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/syst
                   |                            |em/kcron/-/commit/9abf45fa8
                   |                            |bd27a22739a721641e5b8dd679a
                   |                            |9bdc

--- Comment #2 from Albert Astals Cid <aa...@kde.org> ---
Git commit 9abf45fa8bd27a22739a721641e5b8dd679a9bdc by Albert Astals Cid, on
behalf of Cássio Sousa.
Committed on 24/12/2023 at 12:17.
Pushed by aacid into branch 'master'.

Improvements in the handling of crontab comments

Improvements in the handling of crontab comments include appending all
commented lines above a cron expression and discarding previous ones if there
is an enter.

Works situations
```sh
#- - - * randomtext abc
#5 * * * *       /home/ubuntu/teste.sh


#- - - * randomtext abc
5 * * * *       /home/ubuntu/teste.sh
#- - - * randomtext abc
#5 * * * *       /home/ubuntu/teste.sh
```

```sh
#- - - * randomtext abc
#5 * * * *       /home/ubuntu/teste.sh

#- - - * randomtext abc
5 * * * *       /home/ubuntu/teste.sh
```

```sh
# another comment
#- - - * randomtext abc
5 * * * *       /home/ubuntu/teste.sh
```

Before:
| header | header |
| ------ | ------ |
|  ![sk4](/uploads/c612c20090ad6bf522e16d222f4c3256/sk4.png)      |  
![sk5](/uploads/8a54851d6cc5d0fdc911ec5df157fe97/sk5.png)     |


After
| header | header |
| ------ | ------ |
|  ![sk6](/uploads/790890284229d38e6676d04ec1643dbe/sk6.png)      |  
![sk7](/uploads/b48bb6c8ee32fd96d13445a8dfbff66d/sk7.png)     |



Another example

```sh
#- - - * randomtext abc
#5 * * * *       /home/ubuntu/teste.sh
#- - - * randomtext abc
5 * * * *       /home/ubuntu/teste.sh

#teste abc
#\  * * *       /home/ubuntu/kde/src/kcron/Messages.sh
#testes comentários
10 * * * *       /home/ubuntu/kde/src/kcron/Messages.sh
```
![image](/uploads/452bfdd47170c2d82b0ddf97e775e908/image.png)

M  +15   -24   src/crontablib/ctcron.cpp

https://invent.kde.org/system/kcron/-/commit/9abf45fa8bd27a22739a721641e5b8dd679a9bdc

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to