2
0
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:
Marco Hinz 2015-12-16 19:43:40 +01:00
parent dc41ddec88
commit f6395b720b
2 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
### Added ### Added
- `CHANGELOG.md` according to [keepachangelog.com](http://keepachangelog.com). - `CHANGELOG.md` according to [keepachangelog.com](http://keepachangelog.com).
- Option: `--serverlist`
### Changed ### Changed
- Renamed `nvim-remote.py` to `nvr` for convenience. - Renamed `nvim-remote.py` to `nvr` for convenience.

7
nvr
View File

@ -119,6 +119,9 @@ def parse_args():
parser.add_argument('--servername', parser.add_argument('--servername',
metavar = '<sock>', metavar = '<sock>',
help = 'path to unix socket (overrides $NVIM_LISTEN_ADDRESS)') 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() return parser.parse_known_args()
@ -145,6 +148,10 @@ def main():
if sockpath is None: if sockpath is None:
sockpath = '/tmp/nvimsocket' sockpath = '/tmp/nvimsocket'
if args.serverlist:
if sockpath is not None:
print(sockpath)
n = Neovim(sockpath) n = Neovim(sockpath)
if args.remote_silent and n.attached(silent=True): if args.remote_silent and n.attached(silent=True):