दूरस्थ ssh फ़ाइल खुली के साथ कमांड लाइन से emacs शुरू करें
Jan 18 2021
कमांड लाइन से Emacs कैसे शुरू करें और फ़ाइल ट्रॉश ssh खोलें?
आम तौर पर मैं जो करता हूं वह सबसे पहले Emacs खोलते हैं और करते हैं: C-X C-F /ssh:my_remote_server:/file.txt RET
मैं कमांड लाइन से फ़ाइल को सीधे कैसे खोल सकता हूँ:
emacs --remote "/ssh:my_remote_server:/file.txt"
जवाब
2 ArkadiuszDrabczyk Jan 18 2021 at 03:28
Emacs का नया उदाहरण शुरू करते समय एक फ़ाइल खोलने के लिए आप आमतौर पर कर सकते हैं:
emacs "/ssh:server:file"
जैसा कि इसमें वर्णित है man emacs
:
SYNOPSIS
emacs [ command-line switches ] [ files ... ]
यदि आप Emacs डेमॉन का उपयोग करते हैं और Emacs के मौजूदा उदाहरण में एक फ़ाइल खोलना चाहते हैं तो आप भी कर सकते हैं emacsclient "/ssh:server:file"
लेकिन यह टर्मिनल को ब्लॉक करने के लिए emacsclient का कारण होगा:
$ emacsclient "/ssh:freebsd:Makefile"
Waiting for Emacs...
यदि आप emacsclient
टर्मिनल को अवरुद्ध किए बिना उपयोग करना चाहते हैं:
emacsclient --eval "(with-current-buffer (window-buffer) (find-file \"/ssh:server:file\"))"