Skip to content

u/flx92

In this archive from Feb 2019 to Sep 2022

1
posts
5
comments
0
media
15
score

Add set -x before your one-liner to see what is happening.

+/bin/zsh:53> cat files
+/bin/zsh:53> dmenu -l 30
+/bin/zsh:53> awk '{print $2}'
+/bin/zsh:53> vim '~/.vimrc'

vim is opening '~/.vimrc' and not /home/$USER/.vimrc. The tilde '~' is not expanded.

You can use awk to substitute the tilde with your $HOME variable:

vim $(cat files | dmenu -l 30 |awk '{sub("~", "'$HOME'"); print $2}')
8 points

End of this list.

Back to top

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.