2
0
Fork 0
mirror of https://github.com/pepa65/tldr-bash-client.git synced 2024-11-13 07:21:06 +01:00

Merge pull request #5 from pbordron/patch-1

Make compatible with some old bash interpreters
This commit is contained in:
PePa 2017-10-04 16:41:04 +07:00 committed by GitHub
commit 9c99c488e7

2
tldr
View file

@ -316,7 +316,7 @@ Display_tldr(){
'`') ((newfmt)) && Unlinted "Bad first character"
((${#REPLY} <= 2)) && Unlinted "No valid code content"
[[ ! ${REPLY: -1} = '`' ]] && Unlinted "Code doesn't end in backtick"
val=${REPLY:1:-1}
val=${REPLY:1:${#REPLY}-2}
# Value: convert {{value}}
val=${val//\{\{/$CX$V}
val=${val//\}\}/$XV$C}