@jswork/ushell-module-base 1.0.58 → 1.0.60

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
@@ -20,7 +20,6 @@ source $ROOT_PATH/modules/open.sh
20
20
  source $ROOT_PATH/modules/shorty.sh
21
21
  source $ROOT_PATH/modules/tail.sh
22
22
  source $ROOT_PATH/modules/yazi.sh
23
- source $ROOT_PATH/modules/tldr.sh
24
23
 
25
24
  # Edit file
26
25
  alias reload='source $BASH_BASE_PATH/src/index.sh'
package/modules/_ins.sh CHANGED
@@ -1,5 +1,15 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  function ins() {
4
- cp "$1" /usr/local/bin/
4
+ if [ $# -eq 1 ]; then
5
+ # 只有一个参数,保持现有逻辑
6
+ cp "$1" /usr/local/bin/
7
+ elif [ $# -eq 2 ]; then
8
+ # 如果有两个参数,将 $1 复制到 /usr/local/bin/$2
9
+ cp "$1" "/usr/local/bin/$2"
10
+ else
11
+ # 参数错误提示
12
+ echo "Usage: ins <source> [destination]"
13
+ return 1
14
+ fi
5
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/ushell-module-base",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "Unix like shell base module.",
5
5
  "main": "index.sh",
6
6
  "repository": {
package/modules/tldr.sh DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- alias hh='tldr'
4
- export TLDR_LANGUAGE="zh"