Bug 339676 - kate version 3.13.3 doesn't clean indentation for bash
Summary: kate version 3.13.3 doesn't clean indentation for bash
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: indentation (show other bugs)
Version: unspecified
Platform: unspecified All
: HI normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-04 20:09 UTC by Marko Käning
Modified: 2022-09-24 21:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Käning 2014-10-04 20:09:55 UTC
kate doesn't perform a clean indentation for bash scripts, as it seems

Reproducible: Always

Steps to Reproduce:
1) Create this bash script:
---
#!/bin/bash
if [ "$1" == "this" ]; then
    echo "Please"
  echo "align"
echo "this!"
fi
---

2) Click "Tools/Clean Indentation"

Actual Results:  
No change to indentation made by kate

Expected Results:  
One might expect some alignment of the code block in between "if" and "fi", so that all three echos end up starting in one column like this:
---
#!/bin/bash
if [ "$1" == "this" ]; then
    echo "Please"
    echo "align"
    echo "this!"
fi
---

Did I misunderstand the concept of "clean indentation"?
Comment 1 Dominik Haumann 2014-10-05 16:57:09 UTC
Confirmed, "Clean Indentation" does not work, neither if no text is selected, nor if text is selected. This is a regression.
Comment 2 Marko Käning 2014-11-19 22:54:07 UTC
No news here?
Comment 3 Grod 2015-11-26 14:45:22 UTC
This is still happening in Kate: 3.14.7
 :(
Comment 4 Christoph Cullmann 2018-08-17 21:16:05 UTC
Yep, broken.
Patches welcome.
Comment 5 Christoph Cullmann 2022-09-24 21:29:27 UTC
Hi, without somebody providing some patch, this will not happen.

https://kate-editor.org/join-us/

If somebody is able to contribute something, thanks!