mirror of
https://github.com/mhinz/neovim-remote
synced 2024-11-11 13:10:34 +00:00
Implement --serverlist.. again
This commit is contained in:
parent
dc41ddec88
commit
f6395b720b
@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- `CHANGELOG.md` according to [keepachangelog.com](http://keepachangelog.com).
|
||||
- Option: `--serverlist`
|
||||
|
||||
### Changed
|
||||
- Renamed `nvim-remote.py` to `nvr` for convenience.
|
||||
|
7
nvr
7
nvr
@ -119,6 +119,9 @@ def parse_args():
|
||||
parser.add_argument('--servername',
|
||||
metavar = '<sock>',
|
||||
help = 'path to unix socket (overrides $NVIM_LISTEN_ADDRESS)')
|
||||
parser.add_argument('--serverlist',
|
||||
action = 'store_true',
|
||||
help = 'prints socket path to be used')
|
||||
|
||||
return parser.parse_known_args()
|
||||
|
||||
@ -145,6 +148,10 @@ def main():
|
||||
if sockpath is None:
|
||||
sockpath = '/tmp/nvimsocket'
|
||||
|
||||
if args.serverlist:
|
||||
if sockpath is not None:
|
||||
print(sockpath)
|
||||
|
||||
n = Neovim(sockpath)
|
||||
|
||||
if args.remote_silent and n.attached(silent=True):
|
||||
|
Loading…
Reference in New Issue
Block a user