We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I made a small bash script with ChatGPT that completes sessions, it would be nice to implement it
#!/bin/bash _zellij_complete() { local cur prev opts subcommands sessions cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" # Opciones globales y subcomandos opts="-c --config --config-dir -d --debug --data-dir -h --help -l --layout --max-panes -n --new-session-with-layout -s --session -V --version" subcommands="action attach detach delete-all-sessions delete-session kill-all-sessions kill-session list-sessions run setup" # Obtener sesiones activas y eliminar caracteres ANSI sessions=$(zellij list-sessions 2>/dev/null | sed -E "s/\x1B\[[0-9;]*[mK]//g" | awk '{print $1}') if [[ "${prev}" == "zellij" ]]; then # Sugerir opciones globales y subcomandos COMPREPLY=( $(compgen -W "${opts} ${subcommands}" -- "${cur}") ) elif [[ "${subcommands}" == *"${prev}"* ]]; then case "${prev}" in attach|detach|delete-session|kill-session) # Autocompletar nombres de sesión COMPREPLY=( $(compgen -W "${sessions}" -- "${cur}") ) ;; action) # Autocompletar acciones disponibles (ampliar según necesidad) COMPREPLY=( $(compgen -W "focus-next-pane focus-previous-pane resize-up resize-down resize-left resize-right" -- "${cur}") ) ;; run) # Autocompletar comandos disponibles en el sistema COMPREPLY=( $(compgen -c -- "${cur}") ) ;; *) COMPREPLY=() ;; esac elif [[ "${opts}" == *"${prev}"* ]]; then case "${prev}" in --layout|-l|--new-session-with-layout) # Autocompletar archivos de layout (.kdl) desde la carpeta de configuraciones COMPREPLY=( $(compgen -W "$(find ~/.config/zellij/layouts/ -name '*.kdl' 2>/dev/null)" -- "${cur}") ) ;; *) COMPREPLY=() ;; esac else COMPREPLY=() fi } complete -F _zellij_complete zellij
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I made a small bash script with ChatGPT that completes sessions, it would be nice to implement it
The text was updated successfully, but these errors were encountered: