Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
lytedev
4y ago
0 comments
Save
Share
You should instead
pushd /my/path && command && popd
Both in bash AND in fish!
0 comments
1 comments · 1 top-level
top
newest
oldest
CJefferson
4y ago
the problem with that is I ended up in the wrong directory if I press ctrl+c, or in the exact examples you give, if command fails.
j
/
k
navigate · click thread line to collapse