Skip to content

u/hoppen1

In this archive from Oct 2017 to Sep 2018

0
posts
13
comments
0
media
30
score

Top comments

I can try breaking it down:

${1}

same as $1 but enables you to put special bash syntax

${1#pattern}

the # after a variable name is "Parameter expansion: remove shortest matching prefix pattern" so

${1#/*}

just means "remove first letter in the variable if it is a forward slash". This to me doesn't make much sense because it would just remove the initial (root) slash, perhaps the author meant ${1%pattern} which is "remove shortest suffix pattern" (which is after), the "/*" expands to a forward slash and ANY string following it, so in the case of suffix it would remove everything after, in the case of shortest prefix it would only remove the slash

${1:-word}

means "Parameter expansion: Use default value", which just means that if the $1 variable is unset it will default to the word following it

edit: just so you know, this has nothing to do with what you're asking for, the answer is that you need to open a terminal to use terminal programs.

3 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.