Just wondering if it is possible to make lshell show short current working paths? Cant seem to find any details in the lshell documentation.

Comments

omega8cc’s picture

Status: Active » Postponed

Not sure if it is possible, there is no such feature, AFAIK, but it is not really BOA issue.
If you will find a way to do this, feel free to re-open the issue - patches are welcome!

7wonders’s picture

Yeah, I realised this is more of a lshell issue and unfortunately I dont see any way of doing it without changing the shell (or lshell source) which kind of defeats the purpose of lshell! For my own user I have gone ahead and done it though so I get nice pretty short paths and my customised color scheme for bash (foresee any problems with this when it comes to upgrading???).

omega8cc’s picture

Title: Shorter current working paths?? » Shorter current working paths in lshell
Category: support » feature
Status: Postponed » Needs work

Well, maybe it is possible by hacking lshell source a bit, I just didn't try that yet. In fact, I have found it a bit annoying that it displays full path by default. Why not leave this for pwd command? I will look into this anyway. If you have a working patch, please submit it :)

omega8cc’s picture

Status: Needs work » Fixed

This has been fixed in head. There is not only short prompt, but also auto-completion and easy switching between last used directories:

Example for main user:

linode:~# su o1.ftp

         ======== Welcome to the Aegir and Drush shell ========
         Type '?' or 'help' to get the list of allowed commands
                   Your favorite command not allowed?
                     Contact us: support@omega8.cc

o1.ftp:~$ ls
backups  clients  platforms  static  users
o1.ftp:~$ cd p*
o1.ftp:[platforms]$ ls
001
o1.ftp:[platforms]$ cd 0*
o1.ftp:[001]$ ls
acquia-6.25.1		       drupal-7.12-prod		   nodestream-7.x-2.0-alpha10-7.12  pressflow-6.25.1-dev
acquia_commons-6.x-2.5-6.25.1  drupal-7.12-stage	   openatrium-1.2.1-6.25.1	    pressflow-6.25.1-prod
civicrm-3.4.8-6.25.1	       elms-6.x-1.0-alpha6-6.25.1  openchurch-7.x-1.9-alpha1-7.12   pressflow-6.25.1-stage
civicrm-4.1.1-7.12	       fserver-6.25.1		   openoutreach-7.x-1.0-beta8-7.12  prosepoint-0.43-6.25.1
cod-6.x-1.0-beta2-6.25.1       keys			   openpublish-7.x-1.0-alpha7-7.12  ubercart-3.0.2-7.12
commerce-7.x-1.3-7.12	       managingnews-1.2.1-6.25.1   openscholar-2.0-beta13-6.25.1    ubercart-6.x-2.7-6.25.1
drupal-7.12-dev		       nodestream-6.x-1.4-6.25.1   pressflow-5.23.50		    videola-6.x-1.0-alpha2-6.25.1
o1.ftp:[001]$ cd d*
o1.ftp:[sites]$ pwd
/data/disk/o1/distro/001/drupal-7.12-dev/sites
o1.ftp:[sites]$ ls
all  default  example.sites.php
o1.ftp:[sites]$ cd -
o1.ftp:[001]$ cd -
o1.ftp:[sites]$ pwd
/data/disk/o1/distro/001/drupal-7.12-dev/sites
o1.ftp:[sites]$ cd
o1.ftp:~$ pwd
/home/o1.ftp
o1.ftp:~$ 

Example for secondary user:

linode:~# su o1.amazingjohn

         ======== Welcome to the Aegir and Drush shell ========
         Type '?' or 'help' to get the list of allowed commands
                   Your favorite command not allowed?
                     Contact us: support@omega8.cc

o1.amazingjohn:~$ ls
sites
o1.amazingjohn:~$ cd s*
o1.amazingjohn:[sites@amazingjohn]$ pwd
/data/disk/o1/clients/amazingjohn
o1.amazingjohn:[sites@amazingjohn]$ ls
d6.o1.linode.us.host8.biz
o1.amazingjohn:[sites@amazingjohn]$ cd d*
o1.amazingjohn:[d6.o1.linode.us.host8.biz]$ pwd
/data/disk/o1/distro/001/pressflow-6.25.1-dev/sites/d6.o1.linode.us.host8.biz
o1.amazingjohn:[d6.o1.linode.us.host8.biz]$ cd -
o1.amazingjohn:[sites@amazingjohn]$ cd -
o1.amazingjohn:[d6.o1.linode.us.host8.biz]$ cd
o1.amazingjohn:~$ pwd
/home/o1.amazingjohn
o1.amazingjohn:~$ 

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.