| 2578 | else |
| 2579 | alias | sed 's/^alias //g' | sed 's/^/alias -- /' | head -n 1000 >> "$SNAPSHOT_FILE" |
| 2580 | fi |
| 2581 | `,_}async function Ynz(){let q=process.env.PATH;if(Z1()==="windows"){let Y=await m_("echo $PATH",{shell:!0,reject:!1});if(Y.exitCode===0&&Y.stdout)q=Y.stdout.trim()}let K=qnz(),_="";if(_+=` |
| 2582 | # Check for rg availability |
| 2583 | echo "# Check for rg availability" >> "$SNAPSHOT_FILE" |
| 2584 | echo "if ! (unalias rg 2>/dev/null; command -v rg) >/dev/null 2>&1; then" >> "$SNAPSHOT_FILE" |
| 2585 | `,K.type==="function")_+=` |
| 2586 | cat >> "$SNAPSHOT_FILE" << 'RIPGREP_FUNC_END' |
| 2587 | ${K.snippet} |
| 2588 | RIPGREP_FUNC_END |
| 2589 | `;else{let Y=K.snippet.replace(/'/g,"'\\''");_+=` |
| 2590 | echo ' alias rg='"'${Y}'" >> "$SNAPSHOT_FILE" |
| 2591 | `}_+=` |
| 2592 | echo "fi" >> "$SNAPSHOT_FILE" |
| 2593 | `;let z=_nz();if(z!==null)_+=` |
| 2594 | # Shadow find/grep with embedded bfs/ugrep (ant-native only) |
| 2595 | echo "# Shadow find/grep with embedded bfs/ugrep" >> "$SNAPSHOT_FILE" |
| 2596 | cat >> "$SNAPSHOT_FILE" << 'FIND_GREP_FUNC_END' |
| 2597 | ${z} |
| 2598 | FIND_GREP_FUNC_END |
| 2599 | `;return _+=` |
| 2600 | |
| 2601 | # Add PATH to the file |
| 2602 | echo "export PATH=${E4([q||""])}" >> "$SNAPSHOT_FILE" |
| 2603 | `,_}async function $nz(q,K,_){let z=Da1(q),Y=z.endsWith(".zshrc"),$=_?znz(z):!Y?'echo "shopt -s expand_aliases" >> "$SNAPSHOT_FILE"':"",A=await Ynz();return`SNAPSHOT_FILE=${E4([K])} |
| 2604 | ${_?`source "${z}" < /dev/null`:"# No user config file to source"} |
| 2605 | |