Comments (6)
I was thinking this as well - I was considering replacing the shell prompt (e.g. the >
or $
) with an indicator, maybe ๐ for fun. Is that the kind of thing you're thinking of? Open to suggestions here.
from butterfish.
I think it's a great idea. You can actually change my shell prompt from your go binary? That's beyond cool!
I think if they're going to run your wrapped shell you pretty much have license to manipulate anybody's prompt, I'd just want to preserve my current path inside it (mostly every prompt has this today right?).
from butterfish.
I would want to control my prompt myself. Maybe you can offer the bash or zsh functions that the user can include in their brash prompt if they so choose.
The way I do it is the following:
function butterfish_shell {
[[ $BUTTERFISH_SHELL == "true" ]] && echo -ne " ๐ "
}
local FIRST_LINE="...... \${K8S_CONTEXT} \$(butterfish_shell)"
PS1=${TERM_RESET}${PS1_START_MARK}${TERM_TITLE}${FIRST_LINE}${SECOND_LINE}${REGULAR_TEXT}${COMMAND_START_MARK}
Then start butterfish with BUTTERFISH_SHELL=true butterfish shell
If anything, a standard env var that butterfish sets itself would make my config more generic.
from butterfish.
Ahh, @DavidGamba a standard env var is a great idea. This is a helpful discussion, I will play around and get something working.
from butterfish.
Added related commits:
Let me summarize what I've done:
- By default, butterfish will append "๐ " to your
PS1
, meaning it will show up on the command line at each prompt. You can execute with-p ''
if you don't want anything appended, e.g.butterfish shell -p ''
. - We now set
BUTTERFISH_SHELL
as an env var, so you can detect this in your.profile
(or whatever shell config). IfBUTTERFISH_SHELL
is set then it will exit rather than wrapping the shell twice. - You can now run
Status
as a prompt, which will print out the current shell configuration, e.g. which models you're currently using.
I will package this in a new release soon!
from butterfish.
This is released in v0.0.31
, please update and let me know what you think!
from butterfish.
Related Issues (20)
- getting into a strange state after modifying zshrc HOT 1
- Feature Request: expanded embedding capabilities HOT 2
- Feature Request: Safe Retrieval Plugin
- Error: [404:invalid_request_error] The model: `gpt-4` does not exist HOT 7
- Error: system message is required for full chat completion on summarize request HOT 3
- Feature Request: Enhanced Multiline and Clipboard Input in `butterfish prompt` HOT 13
- Feature Request๏ผAzure OpenAI support HOT 5
- Feature Request: Shell Specific Shortcuts HOT 1
- LLM prompts get interpreted as commands with zsh/prezto HOT 3
- text-generation-webui label:question HOT 4
- Bugs with text in bash/gnome terminal HOT 5
- Question: Is this compatible with atuin HOT 4
- getting this: Error: [429:insufficient_quota] You exceeded your current quota, please check your plan and billing details. HOT 2
- Better examples in the README here on github HOT 3
- Bug leads to loss of automatic prompt identification while still in butterfish shell mode.
- Feature Request: allow configuration of more preferences such as default editor to suggest opening files in HOT 1
- Bug: shell and indexquestion do not work on nixos HOT 4
- Last line(s) of output disappear while in shell mode HOT 6
- Feature idea: Code review by GPT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from butterfish.