sesh 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 778297769aa09cf17f59f199a3d60d39fc05e6f9
4
- data.tar.gz: ccb02fbe907590287018b237d5df85d66b36828b
3
+ metadata.gz: a59e65539d5d56ba17b8bb8c3995e7b43335e98b
4
+ data.tar.gz: 23d9f49e10e80f6b4755eb937cda23fc4b2c051b
5
5
  SHA512:
6
- metadata.gz: 8c2a2200deaf1ed97de80198ce860137fcb6dde1f87ffec819666e75dbb7546e65b0cda7e1b43d577ef246c4f31987d9ba059a39000c7eeaaf2da8ec11188ab0
7
- data.tar.gz: d1d3d10d95a64720f2eb665ee689473078703ad8e7c436bcfba864cf07c2b380d5ad6e77395513856afbecda17d73a2126b95341cea1cb271f07ae604d34fd3c
6
+ metadata.gz: d13306e36fe937e8983ee312c3132f5396bba504a3dbd167fab7b886b685a683563739aab5169ffb3492aceae03ccab8a807a37c4ec9670d497e792801e355b8
7
+ data.tar.gz: 36b5b9502a2ed282c3f5fb8a644a7d400c9750f81752d465acfef94fe4f8213b048575a20f886c28999cb8854f61249d804a4073df287c3c4086fca92b82843f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sesh (0.3.6)
4
+ sesh (0.3.7)
5
5
  awesome_print (~> 1.6)
6
6
  colorize (~> 0.7.7)
7
7
  deep_merge (~> 1.0)
@@ -325,6 +325,7 @@ badd +18 exe/return_to_sesh.applescript
325
325
  badd +1 \'/Users/smit1625/Sites/sesh/exe/return_to_sesh.applescript\'
326
326
  badd +2 exe/return_to_sesh
327
327
  badd +3 exe/sesh
328
+ badd +4 Gemfile
328
329
  argglobal
329
330
  silent! argdel *
330
331
  edit lib/sesh/version.rb
@@ -341,6 +342,10 @@ wincmd _ | wincmd |
341
342
  split
342
343
  2wincmd k
343
344
  wincmd w
345
+ wincmd _ | wincmd |
346
+ vsplit
347
+ 1wincmd h
348
+ wincmd w
344
349
  wincmd w
345
350
  wincmd w
346
351
  wincmd _ | wincmd |
@@ -350,26 +355,33 @@ wincmd w
350
355
  wincmd w
351
356
  wincmd _ | wincmd |
352
357
  vsplit
353
- 1wincmd h
358
+ wincmd _ | wincmd |
359
+ vsplit
360
+ 2wincmd h
361
+ wincmd w
354
362
  wincmd w
355
363
  set nosplitbelow
356
364
  set nosplitright
357
365
  wincmd t
358
366
  set winheight=1 winwidth=1
359
367
  exe '1resize ' . ((&lines * 15 + 31) / 62)
360
- exe 'vert 1resize ' . ((&columns * 102 + 136) / 272)
368
+ exe 'vert 1resize ' . ((&columns * 181 + 136) / 272)
361
369
  exe '2resize ' . ((&lines * 14 + 31) / 62)
362
- exe 'vert 2resize ' . ((&columns * 102 + 136) / 272)
370
+ exe 'vert 2resize ' . ((&columns * 90 + 136) / 272)
363
371
  exe '3resize ' . ((&lines * 14 + 31) / 62)
364
- exe 'vert 3resize ' . ((&columns * 102 + 136) / 272)
365
- exe '4resize ' . ((&lines * 22 + 31) / 62)
366
- exe 'vert 4resize ' . ((&columns * 169 + 136) / 272)
372
+ exe 'vert 3resize ' . ((&columns * 90 + 136) / 272)
373
+ exe '4resize ' . ((&lines * 14 + 31) / 62)
374
+ exe 'vert 4resize ' . ((&columns * 181 + 136) / 272)
367
375
  exe '5resize ' . ((&lines * 22 + 31) / 62)
368
- exe 'vert 5resize ' . ((&columns * 169 + 136) / 272)
369
- exe '6resize ' . ((&lines * 14 + 31) / 62)
370
- exe 'vert 6resize ' . ((&columns * 101 + 136) / 272)
376
+ exe 'vert 5resize ' . ((&columns * 90 + 136) / 272)
377
+ exe '6resize ' . ((&lines * 22 + 31) / 62)
378
+ exe 'vert 6resize ' . ((&columns * 90 + 136) / 272)
371
379
  exe '7resize ' . ((&lines * 14 + 31) / 62)
372
- exe 'vert 7resize ' . ((&columns * 170 + 136) / 272)
380
+ exe 'vert 7resize ' . ((&columns * 90 + 136) / 272)
381
+ exe '8resize ' . ((&lines * 14 + 31) / 62)
382
+ exe 'vert 8resize ' . ((&columns * 90 + 136) / 272)
383
+ exe '9resize ' . ((&lines * 14 + 31) / 62)
384
+ exe 'vert 9resize ' . ((&columns * 90 + 136) / 272)
373
385
  argglobal
374
386
  setlocal fdm=manual
375
387
  setlocal fde=0
@@ -380,12 +392,30 @@ setlocal fml=1
380
392
  setlocal fdn=20
381
393
  setlocal fen
382
394
  silent! normal! zE
383
- let s:l = 1 - ((0 * winheight(0) + 7) / 15)
395
+ let s:l = 2 - ((1 * winheight(0) + 7) / 15)
384
396
  if s:l < 1 | let s:l = 1 | endif
385
397
  exe s:l
386
398
  normal! zt
387
- 1
388
- normal! 0
399
+ 2
400
+ normal! 018|
401
+ wincmd w
402
+ argglobal
403
+ edit exe/return_to_sesh
404
+ setlocal fdm=manual
405
+ setlocal fde=0
406
+ setlocal fmr={{{,}}}
407
+ setlocal fdi=#
408
+ setlocal fdl=0
409
+ setlocal fml=1
410
+ setlocal fdn=20
411
+ setlocal fen
412
+ silent! normal! zE
413
+ let s:l = 2 - ((1 * winheight(0) + 7) / 14)
414
+ if s:l < 1 | let s:l = 1 | endif
415
+ exe s:l
416
+ normal! zt
417
+ 2
418
+ normal! 080|
389
419
  wincmd w
390
420
  argglobal
391
421
  edit exe/sesh
@@ -398,12 +428,12 @@ setlocal fml=1
398
428
  setlocal fdn=20
399
429
  setlocal fen
400
430
  silent! normal! zE
401
- let s:l = 3 - ((1 * winheight(0) + 7) / 14)
431
+ let s:l = 3 - ((2 * winheight(0) + 7) / 14)
402
432
  if s:l < 1 | let s:l = 1 | endif
403
433
  exe s:l
404
434
  normal! zt
405
435
  3
406
- normal! 015|
436
+ normal! 05|
407
437
  wincmd w
408
438
  argglobal
409
439
  edit lib/sesh/tmux_control.rb
@@ -416,12 +446,12 @@ setlocal fml=1
416
446
  setlocal fdn=20
417
447
  setlocal fen
418
448
  silent! normal! zE
419
- let s:l = 192 - ((12 * winheight(0) + 7) / 14)
449
+ let s:l = 186 - ((0 * winheight(0) + 7) / 14)
420
450
  if s:l < 1 | let s:l = 1 | endif
421
451
  exe s:l
422
452
  normal! zt
423
- 192
424
- normal! 033|
453
+ 186
454
+ normal! 056|
425
455
  wincmd w
426
456
  argglobal
427
457
  edit lib/sesh/ssh_control.rb
@@ -452,12 +482,12 @@ setlocal fml=1
452
482
  setlocal fdn=20
453
483
  setlocal fen
454
484
  silent! normal! zE
455
- let s:l = 41 - ((15 * winheight(0) + 11) / 22)
485
+ let s:l = 40 - ((17 * winheight(0) + 11) / 22)
456
486
  if s:l < 1 | let s:l = 1 | endif
457
487
  exe s:l
458
488
  normal! zt
459
- 41
460
- normal! 058|
489
+ 40
490
+ normal! 035|
461
491
  wincmd w
462
492
  argglobal
463
493
  edit lib/sesh.rb
@@ -470,12 +500,30 @@ setlocal fml=1
470
500
  setlocal fdn=20
471
501
  setlocal fen
472
502
  silent! normal! zE
473
- let s:l = 45 - ((6 * winheight(0) + 7) / 14)
503
+ let s:l = 43 - ((11 * winheight(0) + 7) / 14)
474
504
  if s:l < 1 | let s:l = 1 | endif
475
505
  exe s:l
476
506
  normal! zt
477
- 45
478
- normal! 031|
507
+ 43
508
+ normal! 023|
509
+ wincmd w
510
+ argglobal
511
+ edit sesh.gemspec
512
+ setlocal fdm=manual
513
+ setlocal fde=0
514
+ setlocal fmr={{{,}}}
515
+ setlocal fdi=#
516
+ setlocal fdl=0
517
+ setlocal fml=1
518
+ setlocal fdn=20
519
+ setlocal fen
520
+ silent! normal! zE
521
+ let s:l = 23 - ((3 * winheight(0) + 7) / 14)
522
+ if s:l < 1 | let s:l = 1 | endif
523
+ exe s:l
524
+ normal! zt
525
+ 23
526
+ normal! 0
479
527
  wincmd w
480
528
  argglobal
481
529
  edit lib/sesh/cli.rb
@@ -488,27 +536,32 @@ setlocal fml=1
488
536
  setlocal fdn=20
489
537
  setlocal fen
490
538
  silent! normal! zE
491
- let s:l = 94 - ((13 * winheight(0) + 7) / 14)
539
+ let s:l = 246 - ((6 * winheight(0) + 7) / 14)
492
540
  if s:l < 1 | let s:l = 1 | endif
493
541
  exe s:l
494
542
  normal! zt
495
- 94
496
- normal! 032|
543
+ 246
544
+ normal! 019|
497
545
  wincmd w
546
+ 4wincmd w
498
547
  exe '1resize ' . ((&lines * 15 + 31) / 62)
499
- exe 'vert 1resize ' . ((&columns * 102 + 136) / 272)
548
+ exe 'vert 1resize ' . ((&columns * 181 + 136) / 272)
500
549
  exe '2resize ' . ((&lines * 14 + 31) / 62)
501
- exe 'vert 2resize ' . ((&columns * 102 + 136) / 272)
550
+ exe 'vert 2resize ' . ((&columns * 90 + 136) / 272)
502
551
  exe '3resize ' . ((&lines * 14 + 31) / 62)
503
- exe 'vert 3resize ' . ((&columns * 102 + 136) / 272)
504
- exe '4resize ' . ((&lines * 22 + 31) / 62)
505
- exe 'vert 4resize ' . ((&columns * 169 + 136) / 272)
552
+ exe 'vert 3resize ' . ((&columns * 90 + 136) / 272)
553
+ exe '4resize ' . ((&lines * 14 + 31) / 62)
554
+ exe 'vert 4resize ' . ((&columns * 181 + 136) / 272)
506
555
  exe '5resize ' . ((&lines * 22 + 31) / 62)
507
- exe 'vert 5resize ' . ((&columns * 169 + 136) / 272)
508
- exe '6resize ' . ((&lines * 14 + 31) / 62)
509
- exe 'vert 6resize ' . ((&columns * 101 + 136) / 272)
556
+ exe 'vert 5resize ' . ((&columns * 90 + 136) / 272)
557
+ exe '6resize ' . ((&lines * 22 + 31) / 62)
558
+ exe 'vert 6resize ' . ((&columns * 90 + 136) / 272)
510
559
  exe '7resize ' . ((&lines * 14 + 31) / 62)
511
- exe 'vert 7resize ' . ((&columns * 170 + 136) / 272)
560
+ exe 'vert 7resize ' . ((&columns * 90 + 136) / 272)
561
+ exe '8resize ' . ((&lines * 14 + 31) / 62)
562
+ exe 'vert 8resize ' . ((&columns * 90 + 136) / 272)
563
+ exe '9resize ' . ((&lines * 14 + 31) / 62)
564
+ exe 'vert 9resize ' . ((&columns * 90 + 136) / 272)
512
565
  tabnext 1
513
566
  if exists('s:wipebuf')
514
567
  silent exe 'bwipe ' . s:wipebuf
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env ruby
2
- system File.expand_path(File.join(__dir__, 'return_to_sesh.applescript'))
2
+ system File.expand_path(File.join(__dir__, 'return_to_sesh.applescript')) + ' &'
@@ -255,3 +255,9 @@ module Sesh
255
255
  end
256
256
  end
257
257
  end
258
+
259
+ def deep_symbolize(h)
260
+ return h.inject({}){|memo,(k,v)| memo[k.to_sym] = deep_symbolize(v); memo} if h.is_a? Hash
261
+ return h.inject([]){|memo,v | memo << deep_symbolize(v); memo} if h.is_a? Array
262
+ return h
263
+ end
@@ -31,7 +31,7 @@ module Sesh
31
31
  tmux_session_pid = `echo $TMUX | cut -d , -f 2`.strip
32
32
  return if tmux_session_pid.length == 0
33
33
  tmux_process_line =
34
- `ps aux | grep tmux | grep #{tmux_session_pid}`.strip.lines.first
34
+ `ps aux | grep tmux | grep -v grep | grep #{tmux_session_pid}`.strip.lines.first
35
35
  return if tmux_process_line.nil?
36
36
  tmux_process_line.split('-s ')[-1].split(' -n')[0]
37
37
  end
@@ -181,9 +181,10 @@ module Sesh
181
181
  options[:command] ||= "#{rspec_cmd} #{options[:spec]}"
182
182
  end
183
183
  if options[:and_return]
184
- options[:command] = "return_to_sesh &; #{options[:command]}"
184
+ options[:command] = "return_to_sesh; #{options[:command]}"
185
185
  end
186
186
  inferred_location = Inferences.infer_tmux_location
187
+ # puts "Inferred location: #{inferred_location}"
187
188
  if options[:pane].nil?
188
189
  if inferred_location[:project] == @project then system options[:command]
189
190
  else interrupt_and_send_command_to_project! options[:command] end
@@ -1,3 +1,3 @@
1
1
  module Sesh
2
- VERSION = '0.3.6'
2
+ VERSION = '0.3.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sesh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - MacKinley Smith