Skip to content

How to create a horizontal line? #3015

Closed Answered by Andriamanitra
bound-variable asked this question in Q&A
Discussion options

You must be logged in to vote

Do it without the quotes:

run printf "hello"

Although if you want to use shell syntax for pipes you will need to run the command in a shell like sh or bash:

run sh -c 'printf %10s | tr " " "-"'

And if you want the horizontal line to appear in your buffer rather than in the infobar you should use textfilter instead of run:

textfilter sh -c 'printf %10s | tr " " "-"'

A couple (easier?) ways to do the same thing if you're using fish shell, ruby, or python:

textfilter fish -c 'string repeat -n10 -'
textfilter ruby -e 'puts "-" * 10'
textfilter python3 -c 'print("-" * 10)'

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@bound-variable
Comment options

@Andriamanitra
Comment options

Answer selected by bound-variable
Comment options

You must be logged in to vote
1 reply
@bound-variable
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants