File tree 5 files changed +37
-4
lines changed
5 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 1
1
__tests__
2
2
dist
3
3
node_modules
4
+ .DS_Store
Original file line number Diff line number Diff line change
1
+ # PWatch
2
+
3
+ Get notified when your processes finishes.
4
+
5
+ ## Usage
6
+
7
+ Add ` pwatch ` at the end of your command.
8
+
9
+ ```
10
+ sleep 10 | pwatch
11
+ ```
12
+ or
13
+
14
+ ```
15
+ sleep 10 && pwatch
16
+ ```
17
+ or
18
+
19
+ ```
20
+ sleep 10; pwatch
21
+ ```
22
+
23
+ Or if you forget to call it when running your command
24
+
25
+ ```
26
+ $ scp somelargefile.tar.gz root@remotehost:~
27
+ $ ps aux | grep scp
28
+ justink 60132 0.0 0.2 3041904 31712 s018 S+ 12:15PM 0:00.20 scp somelargefile.tar.gz root@remotehost:~
29
+ $ pwatch 60132
30
+ ```
31
+
32
+ Then get notified when that process finishes.
33
+ ![ ] ( assets/pwatchinaction.png )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " pwatch" ,
3
- "version" : " 0.0.1 " ,
3
+ "version" : " 0.0.2 " ,
4
4
"description" : " Process Watcher" ,
5
5
"main" : " ./index.js" ,
6
6
"bin" : {
9
9
"scripts" : {
10
10
"prepublish" : " babel src --out-dir dist" ,
11
11
"watch" : " babel -w src --out-dir dist" ,
12
- "dev" : " babel-node index.js" ,
13
12
"test" : " jest"
14
13
},
15
14
"author" : " Justin Krup" ,
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ function handlePiped() {
20
20
21
21
function handlePid ( pid ) {
22
22
if ( ! pid ) {
23
- console . error ( 'No pid specified' ) ;
24
- process . exit ( 1 ) ;
23
+ notifier . notify ( 'No pid specified' ) ;
24
+ process . exit ( 0 ) ;
25
25
}
26
26
checkPid ( pid ) ;
27
27
}
You can’t perform that action at this time.
0 commit comments