mcc,
@mcc@mastodon.social avatar

Linux question:

In bash, I can write:
(cd .. && ls)
and it will run "ls" in the parent directory, but after the command executes I will not have CD'd. The CD is confined in the subshell in the ().

If I try this same command in the alternate shell "fish", it prints the error "command substitutions not allowed here" and nothing is executed. Is there a fish equivalent of "run this single line of commands in a rubber-room subshell whose variables and pwd do not escape"?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • tacticalgear
  • JUstTest
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • provamag3
  • lostlight
  • All magazines