net-utils / net-utils.el

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
;;; net-utils.el --- Network functions

;; Author:  Peter Breton <pbreton@cs.umb.edu>
;; Created: Sun Mar 16 1997
;; Version: $Id$
;; Keywords: 
;; Time-stamp: <Wednesday Dec  3, 2003 11:06:51 steve>

;;; Commentary:
;;
;; There are three main areas of functionality:
;; 
;; * Wrap common network utility programs (ping, traceroute, netstat,
;; nslookup, arp, route). Note that these wrappers are of the diagnostic
;; functions of these programs only.
;; 
;; * Implement some very basic protocols in Emacs Lisp (finger and whois)
;; 
;; * Support connections to HOST/PORT, generally for debugging and the like.
;; In other words, for doing much the same thing as "telnet HOST PORT", and
;; then typing commands.

;;; Change log:
;;
;; Revision 1.1  1998/03/26 03:39:21  steveb
;; New file net-utils.el.
;;
;; Revision 1.5  1998/03/11 00:27:18  pbreton
;; Changed name to net-utils
;; Added AUTOLOAD comments
;; Added net-utils-version variable
;; Don't use /usr/sbin/ping anymore, depend on ping-program-options
;; ping-program-options default set for Linux
;; Finger can now take USER@HOST as an argument
;; network-service-connection is no longer interactive
;;
;; Revision 1.4  1998/03/06 03:57:03  pbreton
;; Changed defvars to defcustoms
;; Use /usr/sbin/ping (if it exists) instead of ping
;; Fixed typo in traceroute-program
;; Fontlock is no longer required
;;
;; Revision 1.2  1998/03/05 12:05:15  pbreton
;; Posted to gnu.emacs.sources
;;
;; Revision 1.1  1998/03/05 11:31:28  pbreton
;; Initial revision
;;
;;
;; AUTOLOADS
;;
;; Put these in your .emacs, or just require the whole file. 
;; 
;; (autoload 'traceroute                    "net-utils" nil t)
;; (autoload 'ping			    "net-utils" nil t)
;; (autoload 'ipconfig			    "net-utils" nil t)
;; (autoload 'arp			    "net-utils" nil t)
;; (autoload 'route			    "net-utils" nil t)
;; (autoload 'netstat			    "net-utils" nil t)
;; (autoload 'nslookup			    "net-utils" nil t)
;; (autoload 'nslookup-host		    "net-utils" nil t)
;; (autoload 'finger			    "net-utils" nil t)
;; (autoload 'whois			    "net-utils" nil t)
;; (autoload 'network-connection            "net-utils" nil t)
;; (autoload 'network-connection-to-service "net-utils" nil t)


;;; Code:
(eval-when-compile
  (require 'comint)
  (autoload 'ffap-string-at-point "ffap"))

(defconst net-utils-version (substring "$Revision$" 11 -2)
  "The version number of net-utils (as string).  The complete RCS id is:

  $Id$")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Customization Variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defgroup net-utils nil
  "Network utility functions."
  :prefix "dirtrack-"
  :group 'shell
  )

(defcustom net-utils-remove-ctl-m 
  (member system-type (list 'windows-nt 'msdos))
  "If non-nil, remove control-Ms from output."
  :group 'net-utils
  :type  'boolean
  )

(defcustom traceroute-program  
  (if (eq system-type 'windows-nt) 
      "tracert"
    "traceroute")
  "Program to trace network hops to a destination."
  :group 'net-utils
  :type  'string
  )

(defcustom traceroute-program-options nil
  "Options for the traceroute program."
  :group 'net-utils
  :type  '(repeat string)
  )

(defcustom ping-program "ping"
  "Program to send network test packets to a host."
  :group 'net-utils
  :type  'string
  )

;; On Linux and Irix, the system's ping program seems to send packets
;; indefinitely unless told otherwise
(defcustom ping-program-options 
  (and (memq system-type (list 'linux 'gnu/linux 'irix))
       (list "-c" "4"))
  "Options for the ping program.
These options can be used to limit how many ICMP packets are emitted."
  :group 'net-utils
  :type  '(repeat string)
  )

(defcustom ipconfig-program  
  (if (eq system-type 'windows-nt)
      "ipconfig"
    "ifconfig")
  "Program to print network configuration information."
  :group 'net-utils
  :type  'string
  )

(defcustom ipconfig-program-options
   (list    
    (if (eq system-type 'windows-nt)
	"/all" "-a"))
  "Options for ipconfig-program."
  :group 'net-utils
  :type  '(repeat string)
  )

(defcustom netstat-program  "netstat"
  "Program to print network statistics."
  :group 'net-utils
  :type  'string
  )

(defcustom netstat-program-options nil
  "Options for netstat-program."
  :group 'net-utils
  :type  '(repeat string)
  )

(defcustom arp-program  "arp"
  "Program to print IP to address translation tables."
  :group 'net-utils
  :type  'string
  )

(defcustom arp-program-options 
  (list "-a")
  "Options for arp-program."
  :group 'net-utils
  :type  '(repeat string)
  )

(defcustom route-program  
  (if (eq system-type 'windows-nt)
      "route"
    "netstat")
  "Program to print routing tables."
  :group 'net-utils
  :type  'string
  )

(defcustom route-program-options 
  (if (eq system-type 'windows-nt)
      (list "print")
    (list "-r"))
  "Options for route-program."
  :group 'net-utils
  :type  '(repeat string)
  )

(defcustom nslookup-program  "nslookup"
  "Program to interactively query DNS information."
  :group 'net-utils
  :type  'string
  )

(defcustom nslookup-program-options  nil
  "List of options to pass to the nslookup program."
  :group 'net-utils
  :type  '(repeat string)
  )

(defcustom nslookup-prompt-regexp "^> "
  "Regexp to match the nslookup prompt."
  :group 'net-utils
  :type  'regexp
  )

(defcustom ftp-program "ftp"
  "Progam to run to do FTP transfers."
  :group 'net-utils
  :type  'string
  )

(defcustom ftp-program-options nil
  "List of options to pass to the FTP program."
  :group 'net-utils
  :type  '(repeat string)
  )

(defcustom ftp-prompt-regexp "^ftp>"
  "Regexp which matches the FTP program's prompt."
  :group 'net-utils
  :type  'regexp
  )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Nslookup goodies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defconst nslookup-font-lock-keywords
  (and window-system
       (progn
	 (require 'font-lock)
	 (list
	  (list nslookup-prompt-regexp 0 font-lock-reference-face)
	  (list "^[A-Za-z0-9 _]+:"     0 font-lock-type-face)
	  (list "\\<\\(SOA\\|NS\\|MX\\|A\\|CNAME\\)\\>" 
		1 font-lock-keyword-face)
	  ;; Dotted quads
	  (list 
	   (mapconcat 'identity
		      (make-list 4 "[0-9]+")
		      "\\.")
	   0 font-lock-variable-name-face)
	  ;; Host names
	  (list 
	   (let ((host-expression "[-A-Za-z0-9]+"))
	     (concat 
	      (mapconcat 'identity
			 (make-list 2 host-expression)
			 "\\.")
	      "\\(\\." host-expression "\\)*")
	     )
	   0 font-lock-variable-name-face)
	  )))
	 "Expressions to font-lock for nslookup.")

(defvar nslookup-abbrev-table (make-abbrev-table)
  "Abbrev table for nslookup.")

(define-abbrev nslookup-abbrev-table "e"   "exit")
(define-abbrev nslookup-abbrev-table "f"   "finger")
(define-abbrev nslookup-abbrev-table "h"   "help")
(define-abbrev nslookup-abbrev-table "lse" "lserver")
(define-abbrev nslookup-abbrev-table "r"   "root")
(define-abbrev nslookup-abbrev-table "s"   "set")
(define-abbrev nslookup-abbrev-table "se"  "server")
(define-abbrev nslookup-abbrev-table "v"   "viewer")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; FTP goodies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defvar ftp-abbrev-table (make-abbrev-table)
  "Abbrev table for ftp.")

(define-abbrev ftp-abbrev-table "q"    "quit")
(define-abbrev ftp-abbrev-table "g"    "get")
(define-abbrev ftp-abbrev-table "p"    "prompt")
(define-abbrev ftp-abbrev-table "anon" "anonymous")

(defconst ftp-font-lock-keywords
  (and window-system
       (progn
	 (require 'font-lock)
	 (list
	  (list ftp-prompt-regexp 0 font-lock-reference-face)))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Utility functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun net-utils-remove-ctrl-m-filter (process output-string)
  "Remove trailing control Ms."
  (let ((old-buffer (current-buffer))
	(filtered-string output-string))
    (unwind-protect
	(let ((moving))
	  (set-buffer (process-buffer process))
	  (setq moving (= (point) (process-mark process)))
	  
	  (while (string-match "\r" filtered-string)
	       (setq filtered-string
		     (replace-match "" nil nil filtered-string)))

	  (save-excursion
	    ;; Insert the text, moving the process-marker.
	    (goto-char (process-mark process))
	    (insert filtered-string)
	    (set-marker (process-mark process) (point)))
	  (if moving (goto-char (process-mark process))))
      (set-buffer old-buffer))))
  
(defmacro net-utils-run-program (name header program &rest args)
  "Run a network information program."
  (` 
   (let ((buf (get-buffer-create (concat "*" (, name) "*"))))
     (set-buffer buf)
     (erase-buffer)
     (insert (, header) "\n")
     (set-process-filter 
      (apply 'start-process (, name) buf (, program) (,@ args))
      'net-utils-remove-ctrl-m-filter)
     (display-buffer buf))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Wrappers for external network programs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;###autoload
(defun traceroute (target)
  "Run traceroute program for TARGET."
  (interactive "sTarget: ")
  (let ((options 
	 (if traceroute-program-options
	     (append traceroute-program-options (list target))
	   (list target))))
    (net-utils-run-program
     (concat "Traceroute" " " target)
     (concat "** Traceroute ** " traceroute-program " ** " target)
     traceroute-program
     options
     )))

;;;###autoload
(defun ping (host)
  "Ping HOST.
If your system's ping continues until interrupted, you can try setting 
`ping-program-options'."
  (interactive 
   (list
    (progn
      (require 'ffap)
      (read-from-minibuffer 
       "Ping host: " 
       (or (ffap-string-at-point 'machine) "")))))
  (let ((options 
	 (if ping-program-options
	     (append ping-program-options (list host))
	   (list host))))
    (net-utils-run-program
     (concat "Ping" " " host)
     (concat "** Ping ** " ping-program " ** " host)
     ping-program
     options
     )))

;;;###autoload
(defun ipconfig ()
  "Run ipconfig program."
  (interactive)
  (net-utils-run-program
   "Ipconfig"
   (concat "** Ipconfig ** " ipconfig-program " ** ")
   ipconfig-program
   ipconfig-program-options
   ))

;; This is the normal name on most Unixes.
;;;###autoload
(defalias 'ifconfig 'ipconfig) 

;;;###autoload
(defun netstat ()
  "Run netstat program."
  (interactive)
  (net-utils-run-program
   "Netstat"
   (concat "** Netstat ** " netstat-program " ** ")
   netstat-program
   netstat-program-options
   ))

;;;###autoload
(defun arp ()
  "Run the arp program."
  (interactive)
  (net-utils-run-program
   "Arp"
   (concat "** Arp ** " arp-program " ** ")
   arp-program
   arp-program-options
   ))

;;;###autoload
(defun route ()
  "Run the route program."
  (interactive)
  (net-utils-run-program
   "Route"
   (concat "** Route ** " route-program " ** ")
   route-program
   route-program-options
   ))

;; FIXME -- Needs to be a process filter
;; (defun netstat-with-filter (filter)
;;   "Run netstat program."
;;   (interactive "sFilter: ")
;;   (netstat)
;;   (set-buffer (get-buffer "*Netstat*"))
;;   (goto-char (point-min))
;;   (delete-matching-lines filter)
;;   )

;;;###autoload
(defun nslookup-host (host)
  "Lookup the DNS information for HOST."
  (interactive
   (list
    (read-from-minibuffer 
     "Lookup host: " 
     (or (ffap-string-at-point 'machine) ""))))
  (let ((options 
	 (if nslookup-program-options
	     (append nslookup-program-options (list host))
	   (list host))))
    (net-utils-run-program
     "Nslookup"
     (concat "** "
      (mapconcat 'identity
		(list "Nslookup" host nslookup-program)
		" ** "))
     nslookup-program
     options
     )))

;;;###autoload
(defun nslookup ()
  "Run nslookup program."
  (interactive)
  (comint-run nslookup-program)
  (set-process-filter (get-buffer-process "*nslookup*")
   'net-utils-remove-ctrl-m-filter)
  (set 
   (make-local-variable 'font-lock-defaults)
   '((nslookup-font-lock-keywords)))
  (set 
   (make-local-variable 'local-abbrev-table)
   nslookup-abbrev-table)
  (abbrev-mode t)
  (make-local-variable 'comint-prompt-regexp)
  (setq comint-prompt-regexp nslookup-prompt-regexp)
  )

;; This is a lot less than ange-ftp, but much simpler.
;;;###autoload
(defun ftp (host)
  "Run ftp program."
  (interactive "sFtp to Host: ")
  (let ((buf (get-buffer-create (concat "*ftp [" host "]*"))))
    (set-buffer buf)
    (comint-mode)
    (comint-exec buf (concat "ftp-" host) ftp-program nil
		 (if ftp-program-options
		     (append (list host) ftp-program-options)
		   (list host)))
    (set 
     (make-local-variable 'font-lock-defaults)
     '((ftp-font-lock-keywords)))

    (make-local-variable 'comint-prompt-regexp)
    (setq comint-prompt-regexp ftp-prompt-regexp)

    ;; Already buffer local!
    (setq comint-output-filter-functions
	  (list 'comint-watch-for-password-prompt))
    (set 
     (make-local-variable 'local-abbrev-table)
     ftp-abbrev-table)
    (abbrev-mode t)
    (switch-to-buffer-other-window buf)
    ))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Network Connections
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Full list is available at:
;; ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers
(defvar network-connection-service-alist 
  (list
    (cons 'echo          7)
    (cons 'active-users 11)
    (cons 'daytime      13)
    (cons 'chargen      19)
    (cons 'ftp          21)
    (cons 'telnet	23)
    (cons 'smtp		25)
    (cons 'time		37)
    (cons 'whois        43)
    (cons 'gopher       70)
    (cons 'finger       79)
    (cons 'www		80)
    (cons 'pop2		109)
    (cons 'pop3		110)
    (cons 'sun-rpc	111)
    (cons 'nntp		119)
    (cons 'ntp		123)
    (cons 'netbios-name 137)
    (cons 'netbios-data 139)
    (cons 'irc		194)
    (cons 'https	443)
    (cons 'rlogin	513)
    )
  "Alist of services and associated TCP port numbers.
This list in not complete.")

;; Workhorse macro
(defmacro run-network-program (process-name host port 
					    &optional initial-string)
  (`
   (let ((tcp-connection)
	 (buf)
	 )
    (setq buf (get-buffer-create (concat "*" (, process-name) "*")))
    (set-buffer buf)
    (or 
     (setq tcp-connection
	   (open-network-stream 
	    (, process-name)
	    buf
	    (, host)
	    (, port)
	    ))
     (error "Could not open connection to %s" (, host)))
    (erase-buffer)
    (set-marker (process-mark tcp-connection) (point-min))
    (set-process-filter tcp-connection 'net-utils-remove-ctrl-m-filter)
    (and (, initial-string)
	 (process-send-string tcp-connection 
			      (concat (, initial-string) "\r\n")))
    (display-buffer buf))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Simple protocols
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Finger protocol
;;;###autoload
(defun finger (user host)
  "Finger USER on HOST."
  ;; One of those great interactive statements that's actually
  ;; longer than the function call! The idea is that if the user
  ;; uses a string like "pbreton@cs.umb.edu", we won't ask for the
  ;; host name. If we don't see an "@", we'll prompt for the host.
  (interactive
    (progn
      (require 'ffap)
      (let* ((answer (read-from-minibuffer "Finger User: " 
					   (ffap-string-at-point 'url))) 
	     (index  (string-match (regexp-quote "@") answer))
	     )
	(if index
	    (list 
	     (substring answer 0 index)
	     (substring answer (1+ index)))
	  (list
	   answer
	   (read-from-minibuffer 
	    "At Host: " 
	    (or (ffap-string-at-point 'machine) "")))))))
  (let* (
	 (user-and-host (concat user "@" host))
	 (process-name 
	  (concat "Finger [" user-and-host "]"))
	 )
    (run-network-program 
     process-name 
     host 
     (cdr (assoc 'finger network-connection-service-alist))
     user-and-host
     )))

(defcustom whois-server-name "whois.internic.net"
  "Host name for the whois service."
  :group 'net-utils
  :type  'string
  )

;; Whois protocol
;;;###autoload
(defun whois (arg search-string)
  "Send SEARCH-STRING to server defined by the `whois-server-name' variable.
With argument, prompt for whois server."
  (interactive "P\nsWhois: ")
  (let ((host 
	 (if arg
	     (read-from-minibuffer "Whois server name: ")
	   whois-server-name))
	)
    (run-network-program 
     "Whois"
     host
     (cdr (assoc 'whois network-connection-service-alist))
     search-string
     )))

(defcustom whois-reverse-lookup-server "whois.arin.net"
  "Server which provides inverse DNS mapping."
  :group 'net-utils
  :type  'string
  )

;;;###autoload
(defun whois-reverse-lookup ()
  (interactive)
  (let ((whois-server-name whois-reverse-lookup-server))
    (call-interactively 'whois)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; General Network connection
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;###autoload
(defun network-connection-to-service (host service)
  "Open a network connection to SERVICE on HOST."
  (interactive 
   (list
    (progn
      (require 'ffap)
      (read-from-minibuffer "Host: " 
			    (ffap-string-at-point 'machine)))
    (completing-read "Service: " 
		     (mapcar 
		      (function 
		       (lambda (elt)
			 (list (symbol-name (car elt)))))
		      network-connection-service-alist))))
  (network-connection 
   host 
   (cdr (assoc (intern service) network-connection-service-alist)))
  )

;;;###autoload
(defun network-connection (host port)
  "Open a network connection to HOST on PORT."
  (interactive "sHost: \nnPort: ")
  (network-service-connection host (number-to-string port)))

(defun network-service-connection (host service)
  "Open a network connection to SERVICE on HOST."
  (let (
	(process-name (concat "Network Connection [" host " " service "]"))
	(portnum (string-to-number service))
	)
    (or (zerop portnum) (setq service portnum))
    (make-comint 
     process-name
     (cons host service))
    (pop-to-buffer (get-buffer (concat "*" process-name "*")))
    ))

(provide 'net-utils)

;;; net-utils.el ends here
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.