magicant / yash

Yet another shell
http://magicant.github.io/yash/
GNU General Public License v2.0
301 stars 28 forks source link

fixed right prompt right justification being off by a single cell #13

Closed leath-dub closed 1 year ago

leath-dub commented 1 year ago

I noticed that the right prompt doesn't fully justify to the right ( it is off by one cell ), this was a simple fix, hopefully I am not missing anything - it works fine with my prompt

magicant commented 1 year ago

Thanks for the patch❤️, but I'm afraid I hesitate to apply it as the one-column gap is actually intentional. When printing the right prompt, the cursor moves after the prompt. If there is no room for the cursor to fit in, the terminal may place it out of the screen or in the next line, which is not desired. All terminal implementations I have tested seem to keep the cursor on the last column of the last line, but I'm not sure if this is a guaranteed behavior in all existing implementations. So, I don't think it is safe to trim the gap.

magicant commented 1 year ago

If you really favor the right prompt printed without the gap, it would be safer to add a shell option to remove the gap rather than unconditionally trim it.

leath-dub commented 1 year ago

I see, which ever works, could you point me to where you set shell options ?

ps: im also happy to update manpage

leath-dub commented 1 year ago

ok I have got the option working now, just need to update the documentation, ill keep you posted :).

I am really unsure how the documentation works, I can see it is marking up to the webpage. Just don't know how many files need editing

leath-dub commented 1 year ago

ok just updated the docs now, hope I have not made a silly mistake. The project is actually very easy to work on btw, it builds easily and the structure is pretty intuitive ( especially with grep xd )

I just realised that my lsp has made some edits to po/ja.po, this is probably of note, maybe we can ignore the file.

EDIT: I restored the ja.po file, I apologise for the messy commits

magicant commented 1 year ago

Great thanks! And could you update test cases as well? There are three test cases that contain an expected list of options:

You can run the tests by make check.

leath-dub commented 1 year ago

ok just added the tests there, here was the result of make check test

magicant commented 1 year ago

Great, I'm going to merge this

leath-dub commented 1 year ago

great !, I have to thank you for your tremendous work on this project, I use it daily and its brilliant.

magicant commented 1 year ago

The upstream svn server seems to have trouble committing the patch. I'll try later.

magicant commented 1 year ago

Merged 32d19e852fc59b1abf6da36afd65c20788904d17. Thanks!

leath-dub commented 1 year ago

nice ! this is one of my first OSS contributions