Version 0.1a
- No explicit dash before examples - Space in front of all lines - Try gif in readme
This commit is contained in:
parent
7f2e817de0
commit
9f7402009d
|
@ -1,13 +1,14 @@
|
|||
# tldr-bash-client
|
||||
|
||||
* version 0.1
|
||||
* version 0.1a
|
||||
* https://github.com/pepa65/tldr-bash-client
|
||||
|
||||
**A fully-functional [bash](https://tiswww.case.edu/php/chet/bash/bashtop.html)
|
||||
client for the [tldr](https://github.com/rprieto/tldr/) project, providing
|
||||
poignant examples of terminal commands.**
|
||||
|
||||
<img alt="tldr list screenshot" src="tldr-list.jpg" title="tldr list" width="600" />
|
||||
[//]: # <img alt="tldr list screenshot" src="tldr-list.jpg" title="tldr list" width="600" />
|
||||
<img alt="tldr list GIF" src="tldr-list.gif" title="tldr list" />
|
||||
|
||||
This client can render both the old and the new tldr markup format.
|
||||
|
||||
|
|
8
tldr
8
tldr
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
set +vx -o pipefail
|
||||
[[ $- = *i* ]] && echo "Don't source this script!" && return 1
|
||||
VERSION='0.1'
|
||||
# tldr-bash-client version 0.1
|
||||
VERSION='0.1a'
|
||||
# tldr-bash-client version 0.1a
|
||||
# forked from Ray Lee, http://github.com/raylee/tldr
|
||||
# modified and expanded by pepa65: http://github.com/pepa65/tldr-bash-client
|
||||
# Requiring: coreutils, less, grep, unzip, curl/wget
|
||||
|
@ -254,7 +254,7 @@ Display_tldr(){
|
|||
'-') ((newfmt)) && Unlinted "Bad first character"
|
||||
((${#REPLY} <= 2)) && Unlinted "No example content"
|
||||
[[ ! ${REPLY:1:1} = ' ' ]] && Unlinted "2nd character no space"
|
||||
Out "$ENL$EPS$E$REPLY$XE" ;;
|
||||
Out "$ENL$EPS$E ${REPLY:2}$XE" ;;
|
||||
' ') ((newfmt)) || Unlinted "Bad first character"
|
||||
((${#REPLY} <= 4)) && Unlinted "No valid code content"
|
||||
[[ ${REPLY:0:4} = ' ' ]] || Unlinted "No four spaces before code"
|
||||
|
@ -274,7 +274,7 @@ Display_tldr(){
|
|||
'') continue ;;
|
||||
*) ((newfmt)) || Unlinted "Bad first character"
|
||||
[[ -z $REPLY ]] && Unlinted "No example content"
|
||||
Out "$ENL$EPS$E- $REPLY$XE" ;;
|
||||
Out "$ENL$EPS$E $REPLY$XE" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 523 KiB |
Loading…
Reference in New Issue