Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uptmuxp completions has error when code added to ~/.zshrc #477
Comments
|
I had the same issue, and found this gem in the click documentation. So, |
Step 1: Provide a summary of your problem
When adding:
to
~/.zshrcit causes errors.Step 2: Provide tmuxp details
tmuxp freeze <SESSION_NAME>Step 3: Describe your environment
Step 4: Describe the problem:
Steps to reproduce:
Take code out of file to see why I'm getting error below and run. Get bigger error shown below.
Observed Results:
1. While in zshrc
2. Run on CLI
**zsh: file name too long:** _tmuxp_completion() {\n local IFS=$'\n'\n COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \\n COMP_CWORD=$COMP_CWORD \\n _TMUXP_COMPLETE=complete $1 ) )\n return 0\n}\n\n_tmuxp_completionetup() {\n local COMPLETION_OPTIONS=""\n local BASH_VERSION_ARR=(${BASH_VERSION//./ })\n # Only BASH version 4.4 and later have the nosort option.\n if [ ${BASH_VERSION_ARR[0]} -gt 4 ] || ([ ${BASH_VERSION_ARR[0]} -eq 4 ] && [ ${BASH_VERSION_ARR[1]} -ge 4 ]); then\n COMPLETION_OPTIONS="-o nosort"\n fi\n\n complete $COMPLETION_OPTIONS -F _tmuxp_completion tmuxp\n}\n\n_tmuxp_completionetup;Expected Results:
ZSH autocompletions for tmuxp options and sub commands.
Relevant Code: