8.2.34 | Linux | www-data (uid:33)
👁 View: path.fish.inc
📁 /snap/google-cloud-cli/501/path.fish.inc
#!/bin/fish # The begin/end block limits the scope of all variables except $PATH begin # This script aims to be a direct mapping of our path.bash.inc shell, rather # than idiomatic fish. Why? I don't really understand fish. set script_link (readlink (status -f)); or set script_link (status -f) # This sed expression is the equivalent of "${script_link%/*}" in bash, which # chops off "/*" (with * as a wildcard) from the end of script_link. set apparent_sdk_dir (echo $script_link | sed 's/\(.*\)\/.*/\1/') if [ "$apparent_sdk_dir" = "$script_link" ] set apparent_sdk_dir . end set old_dir (pwd) # No "cd -P" in fish. It always resolves symlinks to their canonical location, # though, when you "cd" in. # Also, cd is cd is *both* a shell builtin and shell wrapper function (to # implement "cd -") in fish, so "command cd" won't work. "builtin cd" will. set sdk_dir (builtin cd "$apparent_sdk_dir" > /dev/null; and pwd) builtin cd "$old_dir" set bin_path "$sdk_dir/bin" # -gx for global (not limited to this begin/end block) and exportable (part of # the environment for child processes) if not contains "$bin_path" $PATH set -gx PATH "$bin_path" $PATH end end
← Back
💻 Terminal
📤 Upload
📂
Click or Drag & Drop
📁 /snap/google-cloud-cli/501
NameSizePermModifiedActions
📁 .install/-07752026-09-22 12:33🗑 Delete
📁 bin/-07752026-09-22 12:33🗑 Delete
📁 data/-07752026-09-22 12:33🗑 Delete
📁 deb/-07752026-09-22 12:33🗑 Delete
📁 etc/-07552026-09-22 12:33🗑 Delete
📁 lib/-07752026-09-22 12:33🗑 Delete
📁 meta/-07752026-09-22 12:33🗑 Delete
📁 platform/-07752026-09-22 12:33🗑 Delete
📁 rpm/-07752026-09-22 12:33🗑 Delete
📁 snap/-07752026-09-22 12:33🗑 Delete
📁 usr/-07552026-09-22 12:33🗑 Delete
LICENSE1001B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
README380B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
RELEASE_NOTES1.7M06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
VERSION8B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
completion.bash.inc2.6K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
completion.zsh.inc2K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
install.bat14.3K07551980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
install.sh6.3K07551980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
path.bash.inc377B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
path.fish.inc1.2K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
path.zsh.inc31B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
properties39B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del