-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Line 10 in 46b92e2
| if [ $SIZE -gt 65536 ]; then |
This limit is in place because of $(getconf ARG_MAX), which is 1M on macOS12.3 (I'm using ARG_MAX / 2 in my own version), so the 64k limit could definitely be raised/adapted to the current ARG_MAX.
Now the script also has some spare parts, like also sending over the sshrc file:
https://github.com/cdown/sshrc/blob/master/sshrc#L31-L32
Or creating a bashsshrc file:
Lines 45 to 58 in 46b92e2
| echo $'"$( cat << 'EOF' | openssl enc -base64 | |
| #!/usr/bin/env bash | |
| exec bash --rcfile <(echo ' | |
| [ -r /etc/profile ] && source /etc/profile | |
| if [ -r ~/.bash_profile ]; then source ~/.bash_profile | |
| elif [ -r ~/.bash_login ]; then source ~/.bash_login | |
| elif [ -r ~/.profile ]; then source ~/.profile | |
| fi | |
| source '$SSHHOME'/.sshrc; | |
| export PATH=$PATH:'$SSHHOME' | |
| ') "$@" | |
| EOF | |
| )"' | tr -s ' ' $'\n' | openssl enc -base64 -d > \$SSHHOME/bashsshrc | |
| chmod +x \$SSHHOME/bashsshrc |
I don't quite understand what use case would the CMDARG part be useful for but if you really need extra stuff in there, having multiple sshrcs and just symlinking the appropriate one in your wrapper sounds like a much more manageable story.
thomasmerz
Metadata
Metadata
Assignees
Labels
No labels