Bug 120301 - Check if additional magic patterns for shells are registered in freedesktop.org
Summary: Check if additional magic patterns for shells are registered in freedesktop.org
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdecore (show other bugs)
Version: 4.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2006-01-17 13:27 UTC by Nicolas Goutte
Modified: 2018-10-27 02:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Goutte 2006-01-17 13:27:03 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

This is less a bug report than a reminder to check if added pattern rules to the magic files have been registered in the freedesktop.org mimetype database. (Feel free to check if you have time!)

Also this is a reminder to check if some bug reports could be realted to a wrong mimetype as the shell script would not be recognized as such.

Have a nice day!
Comment 1 Nicolas Goutte 2006-01-17 13:32:05 UTC
SVN commit 499261 by goutte:

Add pattern rules for Bash scripts declared with the help of env(1)
(Foreward port of revision 499259)
CCBUG:120301


 M  +5 -0      magic  


--- trunk/KDE/kdelibs/kio/magic #499260:499261
@@ -188,6 +188,11 @@
 0       string          #!/usr/local/bin/bash   application/x-shellscript
 0       string          #!\ /usr/local/bin/bash application/x-shellscript
 
+0       string          #!\ /bin/env bash       application/x-shellscript
+0       string          #!/bin/env bash         application/x-shellscript
+0       string          #!\ /usr/bin/env bash   application/x-shellscript
+0       string          #!/usr/bin/env bash     application/x-shellscript
+
 #
 # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
 0       string          #!/usr/local/bin/zsh    application/x-shellscript
Comment 2 Nicolas Goutte 2006-01-17 13:40:14 UTC
SVN commit 499264 by goutte:

ksh, zsh and tcsh shells can also be in /usr/bin
(Foreward port of revision 499263)
CCBUG:120301


 M  +7 -0      magic  


--- trunk/KDE/kdelibs/kio/magic #499263:499264
@@ -182,6 +182,13 @@
 0       string          #!\ /usr/local/tcsh     application/x-shellscript
 0       string          #!/usr/local/bin/tcsh   application/x-shellscript
 0       string          #!\ /usr/local/bin/tcsh application/x-shellscript
+# /usr/bin paths for ksh, zsh and tcsh
+0       string          #!/usr/bin/ksh          application/x-shellscript
+0       string          #!\ /usr/bin/ksh        application/x-shellscript
+0       string          #!/usr/bin/zsh          application/x-shellscript
+0       string          #!\ /usr/bin/zsh        application/x-shellscript
+0       string          #!/usr/bin/tcsh         application/x-shellscript
+0       string          #!\ /usr/bin/tcsh       application/x-shellscript
 # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
 0       string          #!/bin/bash     		application/x-shellscript
 0       string          #!\ /bin/bash           application/x-shellscript
Comment 3 Nicolas Goutte 2006-01-17 13:47:44 UTC
SVN commit 499266 by goutte:

The ash shell can be in /bin/ash too
(Not sure if /usr/bin/ash would be useful, there is no /usr/bin/bash either.)
(Foreward port of revision 499265)
CCBUG:120301


 M  +2 -0      magic  


--- trunk/KDE/kdelibs/kio/magic #499265:499266
@@ -201,6 +201,8 @@
 0       string          #!/usr/bin/env bash     application/x-shellscript
 
 #
+0       string          #!/bin/ash              application/x-shellscript
+0       string          #!\ /bin/ash            application/x-shellscript
 # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
 0       string          #!/usr/local/bin/zsh    application/x-shellscript
 0       string          #!\ /usr/local/bin/zsh  application/x-shellscript
Comment 4 Nicolas Goutte 2006-01-17 18:24:37 UTC
SVN commit 499372 by goutte:

Of course, if a space is part of the pattern it should be escaped.
Thanks to Volker Krause for noticing the bug.
CCBUG:120301


 M  +4 -4      magic  


--- trunk/KDE/kdelibs/kio/magic #499371:499372
@@ -195,10 +195,10 @@
 0       string          #!/usr/local/bin/bash   application/x-shellscript
 0       string          #!\ /usr/local/bin/bash application/x-shellscript
 
-0       string          #!\ /bin/env bash       application/x-shellscript
-0       string          #!/bin/env bash         application/x-shellscript
-0       string          #!\ /usr/bin/env bash   application/x-shellscript
-0       string          #!/usr/bin/env bash     application/x-shellscript
+0       string          #!\ /bin/env\ bash       application/x-shellscript
+0       string          #!/bin/env\ bash         application/x-shellscript
+0       string          #!\ /usr/bin/env\ bash   application/x-shellscript
+0       string          #!/usr/bin/env\ bash     application/x-shellscript
 
 #
 0       string          #!/bin/ash              application/x-shellscript
Comment 5 Christoph Feck 2011-12-20 01:08:11 UTC
Is this still relevant for KDE 4?
Comment 6 Andrew Crouthamel 2018-09-22 02:06:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Andrew Crouthamel 2018-10-27 02:48:16 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!