Skip to content

Commit c410d71

Browse files
committed
Updated fzchrome
1 parent 93c7cda commit c410d71

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,21 @@ To make this alias persistent across cmd sessions, you can add the doskey comman
177177
cat << 'EOF' >> ~/.bashrc
178178
179179
# Launch Chrome with separate profile directories
180-
fzchrome() {
181-
if [ -z "$1" ]; then
182-
echo "Usage: fzchrome <profile-name>"
183-
return 1
184-
fi
185-
google-chrome --user-data-dir="$HOME/.fzchrome/$1"
186-
}
180+
fzchrome() {
181+
local profile_dir="$HOME/.fzchrome"
182+
183+
if [ -z "$1" ]; then
184+
echo "Usage: fzchrome <profile-name>"
185+
echo "Available profiles:"
186+
if [ -d "$profile_dir" ]; then
187+
ls "$profile_dir"
188+
else
189+
echo " (No profiles found)"
190+
fi
191+
return 1
192+
fi
193+
google-chrome --user-data-dir="$profile_dir/$1"
194+
}
187195
EOF
188196
```
189197

0 commit comments

Comments
 (0)