-
Notifications
You must be signed in to change notification settings - Fork 201
[WIP] Added fish shell support #3110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…s will serve as a foundation for adding nu, etc.
|
Autocomplete still WIP |
|
было бы замечательно если бы ИИ делал правки локализованно, а не переколбашивал прям все сразу... |
seems works correctly now |
Так тут осознанный рефакторинг чтобы вытащить всё, что связано с различием шеллов, в отдельный файл. Иначе адская мешанина из if'ов. Это задел чтобы потом и другие шеллы несложно добавлять было |
|
Что вы, какие агенты)) Агенты тупые. Я по старинке использую чат в aistudio.google.com, где прошу сетку рубить работу на простые и понятные части, генерируя по одному небольшому патчику за раз в специально придуманном мной для этого формате Просто поскольку приношу уже финал, иногда кажется что много и запутанно |
|
ну вот немного офтоп, но вот топчик цикломатической сложности Editor.cpp: Где первая колонка - цикломатическая сложность типа relaxed, вторая - по классической методологии посчитанная. Для понимания глубин: |
|
Ого! Впрочем да, там адок. До нейронок я туда даже лезть боялся, хотя перенос по словам мне лет 10 назад ещё нужен был. |
Agents in general are as smart as given them instructions/rules. If you just ask to do something like build app for something, then you get what @elfmz illustrated: pics But if you know exactly what you need and how to implement it then agents can do all dirty work (with some given time). It's the same like have a team of 2-3 junior developers with encyclopedic knowledge and phenomenal performance. But you need to explain them what to do. Otherwise they'll do very surprising and crazy things. You have an equal chance of improving or breaking the code. And you need to understand design and code very well. But the excellent part is AI can explain the code and design to you! Everything has its time eventually, and AI increases productivity more than 50%.
@unxed It's very cool! But you're wasting your time and talent. Try Cursor AI or Continue.dev. It's already embedded. All you need is to explain the task with maximum details. All rules are in separate file like AGENTS.md. AI agent can make changes, test it, fix build errors, work with git, actually do everything you can imaging. With MCP servers you can connect unlimited possibilities. Try to use claude-4.5-sonnet (with Cursor IDE for example) and you'll see the difference compared to copy/paste with google AI chats. (However, I don't know which country you are in, so it might be local differences.) Now I think the most important thing has become to learn how to use and control AI. This example from @elfmz is a good task for AI for refactoring:
|
|
Thanks for the advice, I've taken it into account. My flaw turned out to be good enough, for example, to implement word wrap in a few days - task everyone has been afraid to tackle since 2016. I tried Cursor, but the built-in LLM is pretty stupid and free limit is not so big, and I had no motivation to use paid options, since AI Studio has a free Gemini 2.5 Pro that perfectly suits my needs. I'm not ready to pay for work on open-source projects. Copy/paste takes minimal time, and the .ap format has already been refined to a very high level of reliability. And the chat offers great flexibility: no guesswork from the not-so-smart Cursor AI what files to add to prompt automatically, only manual file selection - less errors, better results, also it saves tokens; a huge context window for the entire process (or one logical part), rather than small context windows for each prompt like in AI editors. Plus, I constantly revert parts of the dialogue, edit the AI responses to improve future generation, fork chats, and combine different models usage in a single chat. I just shared my method, of course you can use the tools that suit you best. As for the editor refactoring, yes, I've thought about it, but anyway line numbers should be merged first. Also where are several other tasks I am currently working on, like adding osc52 support to GNOME VTE, so I can't promise anything. Editor refactoring is interesting and important, but we'll see how it goes over time. And in any case, my first priority is UX, not code aesthetics, and the editor already seems to have everything we need, so refactoring it isn't urgent. |
|
| #include "headers.hpp" | ||
| #include "lang.hpp" | ||
| #include "interf.hpp" | ||
| #include "config.hpp" | ||
| #include "vtshell_compose.h" | ||
| #include <utils.h> | ||
| #include <RandomString.h> | ||
| #include <TestPath.h> | ||
| #include <errno.h> | ||
| #include <atomic> | ||
| #include <unistd.h> | ||
| #include <fcntl.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of the lines in this PR appear as new because the line endings were changed from the Linux (LF) to Windows (CR LF).
Normal editors should already know that LF should be used:
https://github.com/elfmz/far2l/blob/master/.editorconfig#L5


Isolated the code for different shells; this will serve as a foundation for adding nu, etc.
@tempergate pls test!
Touch #2913 #1264