visidata icon indicating copy to clipboard operation
visidata copied to clipboard

vd command does not work/exist for Windows

Open clach04 opened this issue 1 year ago • 1 comments

Small description

https://github.com/saulpw/visidata/blob/96d27023b255e84500ac599395be75a317dc4de8/README.md?plain=1#L36 does not work

Expected result

expect vd.exe or documentation to mention visidata instead. Unclear what the author's intent is here (suspect the former?)

Actual result with screenshot

There is a visitdata.exe, vd is a python script with no extension.

(py311csv) C:\code\py>where vd
C:\code\py\py311csv\Scripts\vd

(py311csv) C:\code\py>where visidata
C:\code\py\py311csv\Scripts\visidata.exe

(py311csv) C:\code\py>C:\code\py\py311csv\Scripts\vd
'C:\code\py\py311csv\Scripts\vd' is not recognized as an internal or external command,
operable program or batch file.

(py311csv) C:\code\py>vd
'vd' is not recognized as an internal or external command,
operable program or batch file.

If you get an unexpected error, please include the full stack trace that you get with Ctrl-E.

Steps to reproduce with sample data and a .vd

  1. Need Windows
  2. Python 3, I happen to have Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
  3. follow instructions https://github.com/saulpw/visidata/blob/96d27023b255e84500ac599395be75a317dc4de8/README.md?plain=1#L26 - i.e. pip3 install visidata
  4. Try and run vd (see above where)

First try reproducing without any user configuration by using the flag -N. e.g. echo "abc" | vd -f txt -N

Please attach the commandlog (saved with Ctrl-D) to show the steps that led to the issue. See here for more details.

NA

Additional context Please include the version of VisiData and Python.

(py311csv) C:\code\py>python
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr  4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> pipi
KeyboardInterrupt
>>> ^Z


(py311csv) C:\code\py>visidata --version
saul.pw/VisiData v3.0.2

clach04 avatar Jan 19 '24 16:01 clach04

Same problem for me with the current version.

Workaround until this gets fixed: add the following function to your powershell profile file, to act as an alias

function vd { visidata.exe $args }

mplattner avatar Apr 15 '24 16:04 mplattner

Hi @clach04 and @mplattner !

We updated the documentation to mention that visidata should be used on Windows! Thank you so much for pointing that out.

The reason visidata works, but not vd, is that visidata is a Python entrypoint, while vd is an executable script. On Windows, entrypoints work for folks, but not the executables.

We want to keep vd as an executable, because it is significantly faster on start-up than an entrypoint is. But we provided the visidata entrypoint for Windows users.

anjakefala avatar Jul 21 '24 06:07 anjakefala