Broadway 1849 v1.0.7 APK Unlocked

Fight your way to box office glory, while fending off the gangs of New York! Manage a theatre in a game of high-stakes business, dangerous romance, and risky alliances set in the rough-and-tumble…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Bash Completion with ChatGPT

Let chatGPT review your bash history and propose your next command to run.

One of the things I love of the bash command line is the ability to write a few letters of a comand, press twice “tab” and get bash write the rest of the command including parameters for me. This is made possible by the integration in the shell of program named complete.

I wanted to push the envelope and get the prompt to propose to me the next command I should run. For this, I would call chatGPT using the history of commands ran so far, the previous AI suggestions and the commands that I have actually ran.

Each time that bash shows me the prompt PS1, my script would show a line above with the suggested command to run next.

I changed my prompt to this:

And added two aliases to enable or disable the AI suggestions.

I edited the scenario file used by askGPT, a program I wrote to interact with ChatGPT from the command line. I added a few lines of my bash history, as well as a sample of the AI suggestion and the actual command that the user ran.

I opened a new terminal and as I wrote commands I got the suggestions from askGPT.

Till the next hack.

Add a comment

Related posts:

They Ban Books. They Want to Ban Us.

Book bans are often presented as a way to protect children, but they are often used to abuse them and prioritize learning that erases the deep issue of white supremacy and LGBTQIA+ hate in this country.

About CTS

The Call to Serve is a new Medium publication unlike any other, dedicated to the military perspective, written by the very people who’ve lived it firsthand.

Intermittent Fasting Formula

Intermittent fasting has become a popular weight loss strategy in recent years. It involves alternating periods of fasting and eating, with the goal of reducing overall calorie intake and improving…