Compare commits

...

2 Commits

Author SHA1 Message Date
CoeJoder
9e66b505a3 Update README 2024-06-20 01:59:01 -07:00
CoeJoder
4cdad7f51d Update README 2024-06-20 01:55:10 -07:00
2 changed files with 18 additions and 14 deletions

View File

@@ -39,17 +39,13 @@ export LESS='-R'
# more styles available, see: `pygmentize -L styles`
export PYGMENTIZE_STYLE='paraiso-dark'
# optional
alias ls='ls --color=always'
alias grep='grep --color=always'
```
If you opted out of `lesspipe` in the previous step, replace the above `eval` statement with:
```shell
export LESSOPEN='|~/.lessfilter %s'
```
### 4. Generate `~/.lessfilter` (optional)
### 4. Generate `.lessfilter` (optional)
This repo contains a pre-generated [.lessfilter](.lessfilter) which is currently at version `2.18.0` and is updated occasionally. You could use that and skip to the next step, even if its version lags behind that of Pygments (any unsupported file types would fallback to plain-text).
You could also generate a `.lessfilter` yourself by running [main.py](main.py), which scrapes the Pygments lexer documentation website and produces a `.lessfilter` in this directory which corresponds to the latest published version:
@@ -60,9 +56,15 @@ pipenv install
pipenv run python main.py >/dev/null
```
### 5. Copy `~/.lessfilter` to `$HOME` and make it executable
### 5. Copy `.lessfilter` to `$HOME` and make it executable
```shell
cp ./.lessfilter ~
# if you performed step 4, do this:
cp .lessfilter ~
# otherwise, do this:
wget -P ~ https://github.com/CoeJoder/lessfilter-pygmentize/raw/master/.lessfilter
# now make it executable
chmod +x ~/.lessfilter
```

View File

@@ -39,17 +39,13 @@ export LESS='-R'
# more styles available, see: `pygmentize -L styles`
export PYGMENTIZE_STYLE='paraiso-dark'
# optional
alias ls='ls --color=always'
alias grep='grep --color=always'
```
If you opted out of `lesspipe` in the previous step, replace the above `eval` statement with:
```shell
export LESSOPEN='|~/.lessfilter %s'
```
### 4. Generate `~/.lessfilter` (optional)
### 4. Generate `.lessfilter` (optional)
This repo contains a pre-generated [.lessfilter](.lessfilter) which is currently at version `{{ pygments_version }}` and is updated occasionally. You could use that and skip to the next step, even if its version lags behind that of Pygments (any unsupported file types would fallback to plain-text).
You could also generate a `.lessfilter` yourself by running [main.py](main.py), which scrapes the Pygments lexer documentation website and produces a `.lessfilter` in this directory which corresponds to the latest published version:
@@ -60,9 +56,15 @@ pipenv install
pipenv run python main.py >/dev/null
```
### 5. Copy `~/.lessfilter` to `$HOME` and make it executable
### 5. Copy `.lessfilter` to `$HOME` and make it executable
```shell
cp ./.lessfilter ~
# if you performed step 4, do this:
cp .lessfilter ~
# otherwise, do this:
wget -P ~ https://github.com/CoeJoder/lessfilter-pygmentize/raw/master/.lessfilter
# now make it executable
chmod +x ~/.lessfilter
```