@jswork/ushell-module-base 1.0.65 → 1.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.sh CHANGED
@@ -10,6 +10,7 @@ PS1="\[[\e[1;32m\]\u\[\e[m\]\[\e[1;36m\]@\[\e[m\]\[\e[1;35m\]\h\[\e[m\]:\w]\n\$
10
10
  ## base:
11
11
 
12
12
  source $ROOT_PATH/modules/01-edit.sh
13
+ source $ROOT_PATH/modules/02-direnv.sh
13
14
  source $ROOT_PATH/modules/_ins.sh
14
15
  source $ROOT_PATH/modules/_mkp.sh
15
16
  source $ROOT_PATH/modules/cd.sh
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
+ # http://tool.chinaz.com/dns
3
4
  alias e-hosts='sudo vim /etc/hosts'
4
5
  alias e-dns='sudo vim /etc/resolv.conf'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ alias dal="direnv allow"
package/modules/_ins.sh CHANGED
@@ -4,9 +4,13 @@ function ins() {
4
4
  if [ $# -eq 1 ]; then
5
5
  # 只有一个参数,保持现有逻辑
6
6
  cp "$1" /usr/local/bin/
7
+ # 给权限
8
+ chmod +x "/usr/local/bin/$1"
7
9
  elif [ $# -eq 2 ]; then
8
10
  # 如果有两个参数,将 $1 复制到 /usr/local/bin/$2
9
11
  cp "$1" "/usr/local/bin/$2"
12
+ # 给权限
13
+ chmod +x "/usr/local/bin/$2"
10
14
  else
11
15
  # 参数错误提示
12
16
  echo "Usage: ins <source> [destination]"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/ushell-module-base",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "Unix like shell base module.",
5
5
  "main": "index.sh",
6
6
  "repository": {