|
@@ -13,6 +13,21 @@ test -f /usr/share/git-core/contrib/completion/git-prompt.sh \
|
13
|
13
|
### SUBZ ###
|
14
|
14
|
### '''' ###
|
15
|
15
|
|
|
16
|
+prepend() {
|
|
17
|
+ #
|
|
18
|
+ # pre-pend $2 to filename $1
|
|
19
|
+ #
|
|
20
|
+ local path=$1
|
|
21
|
+ local prefix=$2
|
|
22
|
+ local dirpath
|
|
23
|
+ local filename
|
|
24
|
+ local abspath
|
|
25
|
+ abspath=$(readlink -f "$path")
|
|
26
|
+ dirpath=$(dirname "$abspath")
|
|
27
|
+ filename=$(basename "$abspath")
|
|
28
|
+ echo mv "$path" "$dirpath/$prefix-$filename"
|
|
29
|
+}
|
|
30
|
+
|
16
|
31
|
smv() {
|
17
|
32
|
#
|
18
|
33
|
# scp but rm the source
|