Table of Contents

Site Info
Submission Guidelines
Close of the Year - Singletona082
Swift Command Line Editing With Bash Vi Mode - Matt6

Through the Medina - Rjcks

Site Info

Gemini Server:

Molly Brown*

*CGI Scripts disabled for Security Reasons

https://pkg.go.dev/tildegit.org/solderpunk/molly-brown

HTML/Web Server:

nginx

https://www.nginx.com/

=======

What members are not allowed to do

(Because at some point someone ruined it for everyone else.)

* No Eggdrop bots.

* No services that duplicate Ctrl-C.club services (email, IRC, web, Gemini, etc.)

* No virtualized/subsystem OSes (docker, junest, vagrant, etc.)

* No Bitcoin/crypto mining

* No hosting/storage of illegal (in the US) or pirated material.

* No spamming of any kind

* No hacking or attempting to get into other people's accounts/servers.

* One gigabyte storage limit

Feel free to reach out with any questions or concerns you have.

* Email: admin@ctrl-c.club

* Email: eric@pencricket.com

* IRC: #ctrl-c on Tildechat

* IRC: DM "calamitous" on Tildechat

Submission Guidelines

This is a bit of an experiment on my part, but between persons expressing discomfort at what I considered a carefully curated mining of iris and realization that many within the ctrl-c community might prefer a more in-house way of sharing their projects of the month I am going to attempt the following.

Anyone wanting to share content can do so by emailing me at either my ctrl-c (singletona082@ctrl-c.club) or gmail (singletona082@gmail.com) email addresses, or create a file in your home directory on server.

----------

File Name convention: .[Year]-[Month]-zine

Correction: Year is in a two digit string. So submissions for January would look like .24-01-zine

Thanks to Gome I can use either of the following scripts to search for what matches the current month's dot files. This hopefully leaves everything clear on what users wish to share and, truthfully, it lends itself to a democratization of things. I'm just the editor, you want to take a hand at compiling, or want to try something? Here ya go, same data I'm pulling from.f

As for art? While this does not directly allow getting art to me one can still provide links via the month's dot files in a way that I know what out of a long list of recent projects actually happened in the past month.

----------

Gome's Dotfile Scripts

To display everything as a codified thing.

~gome/scripts/dotshare-digest

To display a list of files.

~gome/scripts/check-dotshare

I include links for the sake of transparency, and in the hope others can do something interesting with them. Dotfiles provide an interesting way to share datra within the server if everyone participating can agree on things like naming convention and how to present data within the file itself.

----------

Further Discussion

Please do not feel like this is a 'done' thing. As with much in the server this is just an experiment. It may fissle or thrive. If just saw a problem of 'I do not see many people submitting content. I do not want the zine to stop being a monthly thing if at all reasonably possible. How do I do that ethically?'

My door is always open if anyone has any constructive critiques, advice, or even color commentary.

Close of the Year
singletona082

Well, here we are. At the start of the year I hadn’t really known I would be part of Ctrl-C. I joined purely because I was at loose ends with everything, tired of social media, tired of a lot of things. Mine is not a very vocal or active voice in the community. Yet I still have a seat at the table, for which I am very grateful.

What will next year bring?

Election season in the united states for one. I have opinions, but all I will say is whatever views you hold? Vote. Those that want to Rule rather than Represent encourage apathy. That ‘your vote does not matter’ mindset. They profit from that. So, no matter what side of issues you are on, get out there and not just vote in the big national elections, but get involved locally.

Probably more experimenting by the community here. I have several projects I want to get going both in terms of noveling, and on server. In Meatspace I intend on helping my stepdad build extensions to the barn. I’m sure everyone else has projects they want to do but either don’t think they can or don’t have the energy. Broken new years resolutions and all that.

There will be so much more for 2024 both good and bad. Yet at the heart of it all? Even if deep down you do not want to do anything but curl up and let the world pass. Move. Just a little. Just enough to keep from stalling out. Even if you think everything’s gone to pot and the world is going to burn. Get up anyway. Even if it’s out of spite, get up. Do something.

It’s why I decided Twitter wasn’t worth my time and I found my way here.

Apathy is how horrible happens.

Swift Command Line Editing In Bash With vi Mode

matt6

Introduction

While working in command line nothing is more annoying than typing a long command

only to realize you made a small typo. `bash` has built in feature[^1] to quickly

rectify mistakes[^0] instead of typing the whole command once again.

By default bash uses emacs keybinding for command line editing. In this

article we will focus to using vi keybinding instead.

Setup vi mode in `bash`

Enable[^4] vi mode

```

set -o vi

```

This will allow us to use *vi* keybindings in `bash`.

Now suppose you wanted to run[^3]

```

wget -qO - ctrl-c.club/~matt6/yt7srn3a

```

But you mistyped `wget` as `wgwt`. Of course you can retype the command or use

arrow keys to move cursor to modify the mistake. But using keybinding is much

faster.

vi Modes

Just like in `vi` editor, vi mode in bash has different modes. In each mode keys

behaves differently. There are two vi modes in `bash`

- vi Insert Mode

- vi Command Mode

By default bash enters Insert Mode. This is similar to Insert Mode in `vi/vim`, i.e.

you type text in this mode.

vi Command Mode:

Enter this mode by pressing `ESC`. This mode is similar to normal mode in `vi/vim`. In

this mode each key will have special meaning. For example[^2]

```

Cursor Movement:

h  move backwards a character

l  move forward a character

0  move to begining of the line

$  move of end of the line

Switch To Insert Mode:

i  switch back to insert mode

Command History:

j  next in bash history

k  previous in bash history

/  regex search command history

Modify Command:

r  replace a character at the cursor

dw  delete word next to cursor

v  edit current command in $EDITOR

```

Examples

Cursor Movement in vi Mode:

Let's go back to our previous example, the run *command*[^3], but you

made the following typo

```

wgwt -qO - ctrl-c.club/~matt6/yt7srn3a

```

You want to replace `w -> e`. To do this  press `ESC` to enter *vi command mode*.

Move the cursor over to `w` using `h` and `l` and press `r` and replace it with `e`

, just like you would do in `vi/vim`.

*Search Bash History in vi Mode:*

Suppose you want to search a *command*, let's say [^3], from command history. Then

press `ESC` again to enter *vi command mode* and type

```

/*yt7sr*

```

On pressing enter it will match the *search string* against bash history.

What Next

We saw how to utilize *vi mode* to edit and modify commands quickly. But this article only

covered a handful of *vi keybinding* but there are many more. You can find out more *vi keybinding*

here[^2].

[^0]: `bash` uses `readline` library for command line editing  https://en.wikipedia.org/wiki/GNU_Readline

[^1]: Readline *vi mode* http://www.gnu.org/software/bash/manual/html_node/Readline-vi-Mode.html

[^2]: All available *vi mode* key bindings https://manpages.debian.org/bookworm/readline-common/readline.3readline.en.html#VI_Mode_bindings

[^3]: Command: `wget -qO - ctrl-c.club/~matt6/yt7srn3a`

[^4]: This setting only works for current bash session. To enable `vi` mode to

 all sessions add `set -o vi` to your `~/.bashrc` file or `set editing-mode

 vi` to `~/.inputrc`.

Through the Medina

Rjcks

This is my fourth laptop, and each time the old one has died, or been retired, I have keep the harddisk, copied a lot of the config, and files that are important to me across, and carried on. This laptop is new. My wife bought it for herself, but with the Windows that it came with it was glacial. She tried Ubuntu for a while, bravely and with fortitude, and then bought a better model and passed this on to me.  With Artix, it is now the fastest machine in the house, and with 800G of storage, I feel like a king!

But now much stuff I have accumulated over the past 20 years of computer ownership. Enough material to keep me in reading for the next 150 years, enough software and libraries to bootstrap the next 3 or 4 IT revolutions, if I only knew know, enough junk to stop me somehow to ever doing anything really creative. Somewhere I read recently, "My Collector's Fallacy Pile of Shame".

I'm sitting in a café in Morocco. It's not particularly touristic here: there's a busy road and I'm surrounded by men with there smartphones, although some are talking. I drink lemon verbena when I'm out, and smell the coffee, and coffee at home in the early mornings. I trying to stop, but it's difficult. Perhaps it's got something to do with all the files stacked up on my harddisk. Why should that be? Who knows, but, why not? The computer gives me so much pleasure, but somehow it's not quite helping me to write.

Here's a poem I wrote the year we arrived in Morocco, 2016 I think it

was.

  Through the Medina

 Re-reading old poems from the Welsh hills:

 valleys with mist, autumn leaves and gales,

 the patter of rain on a tin roof,

 and refreshing these memories with Youtube,

 videos of scrambles up mountains,

 campfires and nights on the high moors.

 It is very strange to feel so at home

 in Morocco, in a city

 on the morning bus to work,

 weekends walking though the Medina,

 never alone except for a few snatched minutes

 with a txt file and a poem ...

A year done.
For better or worse.
Make the next

A better one.

END OF LINE