Bug 474082 - No support of fish shell in `kdevelop!` script
Summary: No support of fish shell in `kdevelop!` script
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.11.230403
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-03 07:10 UTC by Petrov Egor
Modified: 2023-09-05 09:47 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 Petrov Egor 2023-09-03 07:10:58 UTC
SUMMARY
Currently, `kdevelop!` script, which autoruns in built-in terminal pane) supports only bash and zsh. When I'm using terminal, it loads into fish, but immediately runs `kdevelop!` script, which start interactive bash shell.


STEPS TO REPRODUCE
1. Set fish as your $SHELL;
2. Open terminal pane in kdevelop;

EXPECTED RESULT
Support of fish shell or at least not run `kdevelop!` script in unsupported shells

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230828
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.11-1-default (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 4600H with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: HUAWEI
Product Name: HLYL-WXX9
System Version: M1010

ADDITIONAL INFORMATION
$SHELL: /usr/bin/fish
Comment 1 Igor Kushnir 2023-09-04 15:00:59 UTC
> Support of fish shell
https://commits.kde.org/kdevelop/f3bde6dcd4767396b5fce7572be565f345adf271 added support for zsh relatively recently. If fish is similar enough to bash, you could easily add support for it too and create a merge request.

> or at least not run `kdevelop!` script in unsupported shells
Not running the `kdevelop!` script in unsupported shells would make KDevelop-specific functions defined in kdevplatform_shell_environment.sh unavailable. So this doesn't look like a viable general solution for me.
Comment 2 Petrov Egor 2023-09-04 19:29:50 UTC
> --- Comment #1 from Igor Kushnir <igorkuo@gmail.com> ---
> > Support of fish shell
> https://commits.kde.org/kdevelop/f3bde6dcd4767396b5fce7572be565f345adf271 added
> support for zsh relatively recently. If fish is similar enough to bash, you
> could easily add support for it too and create a merge request.

However, it's not so similar; at least, fish isn't POSIX and has
own syntax.

> > or at least not run `kdevelop!` script in unsupported shells
> Not running the `kdevelop!` script in unsupported shells would make
> KDevelop-specific functions defined in kdevplatform_shell_environment.sh
> unavailable. So this doesn't look like a viable general solution for me.

I mean, adding an option to disable it in terminal pane would be
enough, although it's not an ideal solution ;)
Comment 3 Igor Kushnir 2023-09-04 19:41:28 UTC
(In reply to Petrov Egor from comment #2)
> I mean, adding an option to disable it in terminal pane would be
> enough, although it's not an ideal solution ;)
If the path where `kdevelop!` is installed is not the first entry in $PATH, you can create a custom, possibly empty, `kdevelop!` script in a preceding path, e.g. ~/.local/bin/kdevelop!. This script should take precedence over the script provided by KDevelop. So, in this sense, the option you ask for already exists.

The ideal solution is obvious: translate KDevelop's scripts into fish. But apparently no one priorities this solution highly enough to implement it.
Comment 4 Petrov Egor 2023-09-04 20:01:34 UTC
> If the path where `kdevelop!` is installed is not the first entry in $PATH, you
> can create a custom, possibly empty, `kdevelop!` script in a preceding path,
> e.g. ~/.local/bin/kdevelop!. This script should take precedence over the script
> provided by KDevelop. So, in this sense, the option you ask for already exists.

Just tried — that's works, thanks! But i believe that it should be only
workaround, not a recommended way ;)

By option i mean checkbox in KDevelop settings menu that sets should
konsole load kdevelop! script or something else.

> The ideal solution is obvious: translate KDevelop's scripts into fish. But
> apparently no one priorities this solution highly enough to implement it.

Okay.
Comment 5 Igor Kushnir 2023-09-05 07:14:38 UTC
(In reply to Petrov Egor from comment #4)
> By option i mean checkbox in KDevelop settings menu that sets should
> konsole load kdevelop! script or something else.
KDevelop developers have been wary of adding options useful to a small percentage of users. The configuration UI shouldn't be cluttered more than it already is. In this case a simple and effective workaround exists for the few users that might want it. So I don't think the proposed checkbox should be implemented.
Comment 6 Petrov Egor 2023-09-05 09:47:31 UTC
Okay, thanks for attention.