[feedback][code-review] histclean cli-tool
▲ 17 r/zsh+2 crossposts

[feedback][code-review] histclean cli-tool

This is my first Zig project!!!

Part of my workflow is to use fzf to search my command history. And I always wanted to have a cli-tool to clean duplicate commands from my history (I don't know if such a tool already exists, I never searched). I could've tried to write that tool in any other language (Python, bash, C#) but the task wasn't interesting, and I wanted it to be a proper bin.

When I started learning Zig, it seemed a proper starting point to make a file manipulation project. So, histclean was born. A cli-tool to clean command history.

Since it's my first project, I'm looking for some feedback, or if someone can review my code. I want to learn more about Zig, but it's tiresome to feel I'm working alone. So any input is welcomed.

Another point is that, I use bash and I never used zsh or any other shell. And I think I could benefit some feedback regarding them, or if some use cases could generate bugs or unexpected output.

A list of things I still don't understand enough to have full confidence about:

  • build.zig and the build system.
  • fuzzy testing.
github.com
u/AbdSheikho — 8 days ago
▲ 1.1k r/emacs+1 crossposts

the learning cliff and the View from the Top

u/AbdSheikho — 9 days ago
▲ 18 r/Zig

How can I get with my zig project to the "sudo make install" point?

My goal in any project I work on is to reach the sudo make install point. Which means:

  • the binary is built to the user $PATH.
  • a man-page is created and available.

What should I do, apply, read, or learn to get the zig build system to this point?

Note: I should be able to reverse the installation process also.

reddit.com
u/AbdSheikho — 20 days ago
▲ 10 r/Zig

How can I copy/backup a Io.File file before write over it?

Self-explanatory

I'm doing some io stuff where I'm doing the usual read/write from file. But I want to backup the file (with .backup postfix) before I do any read or write to it.

Is there a way to copy/backup the file based on the Io.File type?

reddit.com
u/AbdSheikho — 22 days ago

| Why do you use Mod+Enter instead of Mod+semicolon as shortcut for terminal?!

Self-explanatory...

For me the Enter (Return) key is so far that I never use it, but I always see the Mod+Enter used throughout many configs and suggestions. Like really.. why?

I always associated the semicolon with commands, so it's the most logical key to launch a terminal.

Note: I know everyone can do what they like, but that's why it's a discussion, and I'll be glad to hear your thoughts.

reddit.com
u/AbdSheikho — 30 days ago

Looking for some mentoring and advices before building/config my own st-terminal

So... I'm diving into st terminal to have a my own custom "alacritty with ligatures, image rendering, and vim bindings".

Question #1... What are some of the must have patches? Scrollback for sure.

Question #2... Is there any patch that is redundant now? Meaning st-0.9.3 cover it.

Question #3... What is the most annoying patch that conflicts each time it gets applied? I'm looking at kitty protocol patch and it looks huge, so I'm guessing it will cause conflict for sure.

reddit.com
u/AbdSheikho — 1 month ago
▲ 36 r/neovim

A lightweight, zero-dependency Neovim plugin that aims to keep you focused while navigating your buffer.

Some setups use set scrolloff=999 to keep the cursor centered and smooth the scrolling experience. But once you start making small jumps, you'll notice how disorienting it can be. On vertical monitors especially, having your cursor land at the halfway mark makes everything above it redundant.

focusline.nvim addresses this by keeping your cursor at a fixed viewport position/line while you navigate, reducing disorientation and keeping your eyes on one consistent reading line.

Although the F-Shaped Reading pattern was discovered in webpage design and content layout, it still applies to editors — read it to understand how screen layout affects fast reading.

What do you think about this plugin? I would appreciate feedback.

u/AbdSheikho — 2 months ago
▲ 18 r/Zig

With the 0.16 release I thought that I should restart my Ziglings track, since the first time went without me recording/documenting what I learnt.

So the first thoughts that came to my mind is... I need to 1) clone/fork Ziglings 2) solve the exercises 3) push my solutions to my dedicated repo.

I opened github to initial an empty repo, but then I realised that I'll be providing Ziglings to github in that why.

Is that ethical? What should I do? Or am I overthinking stuff here, and it's irrelevant?

reddit.com
u/AbdSheikho — 2 months ago