mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 14:01:36 +01:00
* Corrected the logic to execute the cheat script.
* Check VISUAL, CHEAT_EDITOR, EDITOR environment variables before falling back to wordpad as the default editor.
This commit is contained in:
parent
da92421948
commit
fcb82778e4
@ -1,10 +1,8 @@
|
|||||||
@echo off
|
@echo OFF
|
||||||
|
|
||||||
if not defined EDITOR (set EDITOR=write)
|
if not defined CHEAT_EDITOR if not defined EDITOR if not defined VISUAL (
|
||||||
|
set CHEAT_EDITOR=write
|
||||||
|
)
|
||||||
|
|
||||||
:: Retrieve the path to python executable.
|
REM %~dp0 is black magic for getting directory of script
|
||||||
for /f "delims=" %%A in ('where python') do set "PATHOFPYTHON=%%A"
|
python %~dp0cheat %*
|
||||||
%PATHOFPYTHON% %PATHOFPYTHON%\..\Scripts\cheat %*
|
|
||||||
|
|
||||||
:: Remove this variable to avoid polluting the environment.
|
|
||||||
set PATHOFPYTHON=
|
|
||||||
|
Loading…
Reference in New Issue
Block a user