mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
new function for copying text to chatgpt
This commit is contained in:
@@ -17,28 +17,40 @@ in {
|
|||||||
};
|
};
|
||||||
historySubstringSearch.enable = true;
|
historySubstringSearch.enable = true;
|
||||||
|
|
||||||
initExtraFirst = ''
|
initExtraFirst =
|
||||||
bindkey -e
|
#bash
|
||||||
${if fetch == "neofetch" then
|
''
|
||||||
pkgs.neofetch + "/bin/neofetch"
|
bindkey -e
|
||||||
else if fetch == "nerdfetch" then
|
${if fetch == "neofetch" then
|
||||||
"nerdfetch"
|
pkgs.neofetch + "/bin/neofetch"
|
||||||
else if fetch == "pfetch" then
|
else if fetch == "nerdfetch" then
|
||||||
"echo; ${pkgs.pfetch}/bin/pfetch"
|
"nerdfetch"
|
||||||
else
|
else if fetch == "pfetch" then
|
||||||
""}
|
"echo; ${pkgs.pfetch}/bin/pfetch"
|
||||||
|
else
|
||||||
|
""}
|
||||||
|
|
||||||
function sesh-sessions() {
|
function sesh-sessions() {
|
||||||
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
||||||
[[ -z "$session" ]] && return
|
[[ -z "$session" ]] && return
|
||||||
sesh connect $session
|
sesh connect $session
|
||||||
}
|
}
|
||||||
|
|
||||||
zle -N sesh-sessions
|
function chatgptlist(){
|
||||||
bindkey -M emacs '\es' sesh-sessions
|
for arg in "$@"; do
|
||||||
bindkey -M vicmd '\es' sesh-sessions
|
echo "$arg:"
|
||||||
bindkey -M viins '\es' sesh-sessions
|
echo "\`\`\`"
|
||||||
'';
|
cat "$arg"
|
||||||
|
echo "\`\`\`"
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N sesh-sessions
|
||||||
|
bindkey -M emacs '\es' sesh-sessions
|
||||||
|
bindkey -M vicmd '\es' sesh-sessions
|
||||||
|
bindkey -M viins '\es' sesh-sessions
|
||||||
|
'';
|
||||||
|
|
||||||
history = {
|
history = {
|
||||||
ignoreDups = true;
|
ignoreDups = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user