@jswork/ushell-module-git 1.0.19 → 1.0.21

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
@@ -82,6 +82,9 @@ alias git-size="git count-objects -vH";
82
82
  ## add github cache:
83
83
  alias github-cache='ssh-add ~/.ssh/id_rsa.github.com >/dev/null 2>/dev/null;';
84
84
 
85
+ ## move subdirs to root:
86
+ alias mvg="${ROOT_PATH}/modules/08-mvg.sh";
87
+
85
88
  # git-url-cli
86
89
  # alias guc='git-url-cli'
87
90
 
@@ -91,4 +94,4 @@ alias github-cache='ssh-add ~/.ssh/id_rsa.github.com >/dev/null 2>/dev/null;';
91
94
  # git-completion
92
95
  if [ -f ~/.git-completion.bash ]; then
93
96
  . ~/.git-completion.bash
94
- fi
97
+ fi
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # 1.from $1 or ls -d */ | awk '{printf $1}'
4
+ subdir=$1 || subdir=$(ls -d */ | awk '{printf $1}')
5
+ # 2. remove .git directory
6
+ cd $subdir && rm -rf .git && cd ..
7
+ # 3. move all files to parent directory
8
+ mv $subdir/{*,.[^.]*} .
9
+ # 4. remove subdirectory
10
+ rm -rf $subdir
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/ushell-module-git",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Unix like shell module for git.",
5
5
  "main": "index.sh",
6
6
  "repository": {