User Tools

Site Tools


resources:bash_resources

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:bash_resources [2016/01/27 20:51] anthonyresources:bash_resources [2019/05/22 16:08] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== bash Resources ======
 +
 +\\
 +
 ====== bash variables ====== ====== bash variables ======
  
Line 10: Line 14:
 declare -p declare -p
 </code> </code>
 +
 +\\
 +----
  
 ====== bash command prompt customization ====== ====== bash command prompt customization ======
  
 +<2016-01-27>
 +
 +===== Show cwd basename, not entire absolute path =====
 +
 +First, back up the copy of ''.bashrc'' that came with Ubuntu:
  
 <code bash> <code bash>
Line 18: Line 30:
 </code> </code>
  
-Made this change:+Changed ''\w'' (absolute path, I think) to ''\W'' ("basename", just the single directory name):
  
 <code bash> <code bash>
Line 30: Line 42:
 fi fi
 </code> </code>
 +
 +Based on advice from:
  
 http://askubuntu.com/questions/16728/hide-current-working-directory-in-terminal http://askubuntu.com/questions/16728/hide-current-working-directory-in-terminal
  
 +http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html
 +
 +
 +\\
 +----
resources/bash_resources.1453945912.txt.gz · Last modified: (external edit)