Skip to content

Commit 52c4afa

Browse files
committed
Indicate when in Homesick shell
Set env var after `homesick cd`. This allows custom prompts to add a visual indicator that are in a shell within a shell.
1 parent a57780d commit 52c4afa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/homesick/cli.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ def cd(castle = DEFAULT_CASTLE_NAME)
237237
"Opening a new shell in castle '#{castle}'. To return to the original one exit from the new shell.",
238238
:green
239239
inside castle_dir do
240-
system(ENV.fetch('SHELL', nil))
240+
shell = ENV.fetch('SHELL', nil)
241+
system("HOMESICK_SHELL=1 #{shell}") if shell
241242
end
242243
end
243244

0 commit comments

Comments
 (0)