Browse Source

Modify PS1 to include working directory

To improve debugability, include the cwd in the PS1 prompt
for interactive shells.

Change-Id: I462cd63e68fd455e8e71c6849bd35501c46d7b92
changes/07/511007/3
Ben Swartzlander 1 year ago
parent
commit
c6d3c8478d
2 changed files with 17 additions and 0 deletions
  1. 1
    0
      patches/series
  2. 16
    0
      patches/skeleton-profile-ps1.patch

+ 1
- 0
patches/series View File

@@ -2,3 +2,4 @@ nfs-utils-enable-nfsv4.patch
2 2
 samba4-fixes.patch
3 3
 bootloader-alignment-fix.patch
4 4
 dropbear-default-path.patch
5
+skeleton-profile-ps1.patch

+ 16
- 0
patches/skeleton-profile-ps1.patch View File

@@ -0,0 +1,16 @@
1
+Index: buildroot/system/skeleton/etc/profile
2
+===================================================================
3
+--- buildroot.orig/system/skeleton/etc/profile	2017-10-07 19:55:20.773561441 -0400
4
++++ buildroot/system/skeleton/etc/profile	2017-10-07 19:55:33.381690124 -0400
5
+@@ -2,9 +2,9 @@
6
+ 
7
+ if [ "$PS1" ]; then
8
+ 	if [ "`id -u`" -eq 0 ]; then
9
+-		export PS1='# '
10
++		export PS1='\w # '
11
+ 	else
12
+-		export PS1='$ '
13
++		export PS1='\w $ '
14
+ 	fi
15
+ fi
16
+ 

Loading…
Cancel
Save