Advertisement
Jackspade9624

custom fish shell

Mar 7th, 2025 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. /data/data/com.termux/files/home/.config/fish
  2.  
  3. or
  4.  
  5. nano ~/.config/fish/config.fish
  6.  
  7.  
  8. save the following in config.fish file
  9.  
  10.  
  11.  
  12. if status is-interactive
  13. # Commands to run in interactive sessions can go here
  14. end
  15.  
  16. function fish_prompt
  17.  
  18. # interactive user name @ host name, date>
  19.  
  20. # Print "$(date)" to magenta color
  21.  
  22. echo -e "\e[35m$(date)\e[0m"
  23.  
  24. echo (pwd)
  25.  
  26. # Print "Jack's gone fishing..." in blue color
  27.  
  28. echo -e " \e[34mJack's gone fishing...
  29. [~]:#\e[0m "
  30.  
  31. end
  32.  
  33.  
  34.  
  35. echo $SHELL
  36.  
  37. check your current home shell
  38.  
  39.  
  40. chsh bash
  41.  
  42. Changing the login shell
  43. Enter the new value, or press ENTER for the default
  44. Login Shell [bash]:
  45.  
  46.  
  47. color change
  48.  
  49.  in fish shell, run
  50.  
  51.  
  52. # Set normal text color to white
  53.  
  54.  
  55.  
  56. set fish_color_normal white
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. # Set command color to green
  65.  
  66.  
  67.  
  68. set fish_color_command green
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76. # Set keyword color to cyan
  77.  
  78.  
  79.  
  80. set fish_color_keyword cyan
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. # Set error color to red and bold
  89.  
  90.  
  91.  
  92. set fish_color_error red --bold
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement