Skip to content

Instantly share code, notes, and snippets.

@kylewlacy
Created June 5, 2016 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylewlacy/dc4ddb69fa00203b3e2025357975c805 to your computer and use it in GitHub Desktop.
Save kylewlacy/dc4ddb69fa00203b3e2025357975c805 to your computer and use it in GitHub Desktop.
fish subshell substitution
# bash:
# # <(some_command) returns a file (technically a named pipe) for the result of some_command
# $ echo <(echo "hi")
# /dev/fd63
# $ cat <(echo "hi")
# hi
#
# fish:
# # (some_command | psub) returns a file for the result of some_command
# $ echo (echo "hi" | psub)
# /var/folders/kx/nwt3sjj93fl0hmb_trw509gc0000gn/T//.psub.CWoF3yvGyO
# $ cat (echo "hi" | psub)
# hi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment