sh-658a852a.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import{g as a}from"./index-fe76da25.js";function c(s,i){for(var n=0;n<i.length;n++){const t=i[n];if(typeof t!="string"&&!Array.isArray(t)){for(const e in t)if(e!=="default"&&!(e in s)){const o=Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(s,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var p={exports:{}};(function(s,i){ace.define("ace/snippets/sh.snippets",["require","exports","module"],function(n,t,e){e.exports=`# Shebang. Executing bash via /usr/bin/env makes scripts more portable.
  2. snippet #!
  3. #!/usr/bin/env bash
  4. snippet if
  5. if [[ \${1:condition} ]]; then
  6. \${2:#statements}
  7. fi
  8. snippet elif
  9. elif [[ \${1:condition} ]]; then
  10. \${2:#statements}
  11. snippet for
  12. for (( \${2:i} = 0; $2 < \${1:count}; $2++ )); do
  13. \${3:#statements}
  14. done
  15. snippet fori
  16. for \${1:needle} in \${2:haystack} ; do
  17. \${3:#statements}
  18. done
  19. snippet wh
  20. while [[ \${1:condition} ]]; do
  21. \${2:#statements}
  22. done
  23. snippet until
  24. until [[ \${1:condition} ]]; do
  25. \${2:#statements}
  26. done
  27. snippet case
  28. case \${1:word} in
  29. \${2:pattern})
  30. \${3};;
  31. esac
  32. snippet go
  33. while getopts '\${1:o}' \${2:opts}
  34. do
  35. case $$2 in
  36. \${3:o0})
  37. \${4:#staments};;
  38. esac
  39. done
  40. # Set SCRIPT_DIR variable to directory script is located.
  41. snippet sdir
  42. SCRIPT_DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
  43. # getopt
  44. snippet getopt
  45. __ScriptVersion="\${1:version}"
  46. #=== FUNCTION ================================================================
  47. # NAME: usage
  48. # DESCRIPTION: Display usage information.
  49. #===============================================================================
  50. function usage ()
  51. {
  52. cat <<- EOT
  53. Usage : $\${0:0} [options] [--]
  54. Options:
  55. -h|help Display this message
  56. -v|version Display script version
  57. EOT
  58. } # ---------- end of function usage ----------
  59. #-----------------------------------------------------------------------
  60. # Handle command line arguments
  61. #-----------------------------------------------------------------------
  62. while getopts ":hv" opt
  63. do
  64. case $opt in
  65. h|help ) usage; exit 0 ;;
  66. v|version ) echo "$\${0:0} -- Version $__ScriptVersion"; exit 0 ;;
  67. \\? ) echo -e "\\n Option does not exist : $OPTARG\\n"
  68. usage; exit 1 ;;
  69. esac # --- end of case ---
  70. done
  71. shift $(($OPTIND-1))
  72. `}),ace.define("ace/snippets/sh",["require","exports","module","ace/snippets/sh.snippets"],function(n,t,e){t.snippetText=n("./sh.snippets"),t.scope="sh"}),function(){ace.require(["ace/snippets/sh"],function(n){s&&(s.exports=n)})}()})(p);var r=p.exports;const $=a(r),f=c({__proto__:null,default:$},[r]);export{f as s};