"Set prompt"


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users "Set prompt"
# 1  
Old 10-09-2006
Question "Set prompt"

Hi
Currently amending my bash profiles, there is a command that makes my session jump into another location. I just wonder if I could pre-define my prompt to begin with "cd " from this location (in order to navigate further into sub-directories). Is there any way of doing that? An important thing is that I just want this setting for the next prompt only, not afterwards.

Cheers
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. Shell Programming and Scripting

Why awk print is strange when I set FS = " " instead of FS = "\t"?

Look at the following data file(cou.data) which has four fields separated by tab. Four fields are country name, land area, population, continent where it belongs. As for country name or continent name which has two words, two words are separated by space. (Data are not accurately... (1 Reply)
Discussion started by: chihuyu
1 Replies

4. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

7. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

8. Programming

Differece between "env" and "set" command

Hi, Please clarify what is the difference between "env" and "set" command. I guess set will display the system variables and user defined variables. Thanks Sweta (1 Reply)
Discussion started by: sweta
1 Replies

9. Shell Programming and Scripting

Problem with "set" and "awk"

Hi, i'm programming on /bin/csh and i need to get the number extracted by this: set ppl_kn = $(awk '{ field = $6 } ; END{ print field }' < ppl_LM_kn.ppl ) and the output is: "Illegal variable name." Please anyone can help me what's wrong? Thanks in advance (2 Replies)
Discussion started by: tmxps
2 Replies
Login or Register to Ask a Question
GIT-SH(1)																 GIT-SH(1)

NAME
git-sh -- a git shell SYNOPSIS
git-sh DESCRIPTION
git-sh starts an interactive bash(1) session modified for git-heavy workflows. Typical usage is to change into the directory of a git work tree or bare repository and run the git-sh command to start an interactive shell session. Top-level command aliases are created for all core git(1) subcommands, git-sh builtin aliases (see BUILTIN ALIASES), and git command aliases defined in ~/.gitconfig. BUILTIN ALIASES
git-sh loads a set of standard aliases in addition to all core git commands. The builtin aliases are overridden by aliases defined in the user or system gitconfig files. a git add b git branch c git checkout d git diff f git fetch --prune k git cherry-pick l git log --pretty=oneline --abbrev-commit n git commit --verbose --amend r git remote s git commit --dry-run --short t git diff --cached The Staging Area a git add aa git add --update (mnemonic: "add all") stage git add ap git add --patch p git diff --cached (mnemonic: "patch") ps git diff --cached --stat (mnemonic: "patch stat") unstage git reset HEAD Commits and Commit History ci git commit --verbose ca git commit --verbose --all amend git commit --verbose --amend n git commit --verbose --amend k git cherry-pick re git rebase --interactive pop git reset --soft HEAD^ peek git log -p --max-count=1 Fetching and Pulling f git fetch pm git pull (mnemonic: "pull merge") pr git pull --rebase (mnemonic: "pull rebase") Miscellaneous Commands d git diff ds git diff --stat (mnemonic: "diff stat") hard git reset --hard soft git reset --soft scrap git checkout HEAD CUSTOM ALIASES
Anything defined in the [alias] section of the repository, user, or system git config files are also available as top-level shell commands. Assuming a ~/.gitconfig that looked like this: [alias] ci = commit --verbose ca = commit -a d = diff s = status thanks = !git-thanks ... you might then have the following shell session: master!something> echo "stuff" >somefile master!something*> s M somefile master!something*> d diff --git a/somefile b/somefile -- a/somefile ++ b/somefile @@ -0,0 +1 @@ + stuff master!something*> ca -m "add stuff" master!something> thanks HEAD PROMPT The default prompt shows the current branch, a bang (!), and then the relative path to the current working directory from the root of the work tree. If the work tree includes modified files that have not yet been staged, a dirty status indicator (*) is also displayed. The git-sh prompt includes ANSI colors when the git color.ui option is set and enabled. To enable git-sh's prompt colors explicitly, set the color.sh config value to auto: $ git config --global color.sh auto Customize prompt colors by setting the color.sh.branch, color.sh.workdir, and color.sh.dirty git config values: $ git config --global color.sh.branch 'yellow reverse' $ git config --global color.sh.workdir 'blue bold' $ git config --global color.sh.dirty 'red' See colors in git for information. COMPLETION
Bash completion support is automatically enabled for all git built-in commands and also for aliases defined in the user ~/.gitconfig file. The auto-completion logic is smart enough to know an alias d that expands to git-diff should use the same completion configuration as the git-diff command. The completion code is a slightly modified version of the git bash completion script shipped with the core git distribution. The script is built into thegit-sh executable at compile time and need not be obtained or installed separately. CUSTOMIZING
Most git-sh behavior can be configured by editing the user or system gitconfig files (~/.gitconfig and /etc/gitconfig) either by hand or using git-config(1). The [alias] section is used to create basic command aliases. The /etc/gitshrc and ~/.gitshrc files are sourced (in that order) immediately before the shell becomes interactive. The ~/.bashrc file is sourced before either /etc/gitshrc or ~/.gitshrc. Any bash customizations defined there and not explicitly overrid- den by git-sh are also available. ENVIRONMENT
PS1 Set to the dynamic git-sh prompt. This can be customized in the ~/.gitshrc or /etc/gitshrc files. GIT_DIR Explicitly set the path to the git repository instead of assuming the nearest .git path. GIT_WORK_TREE Explicitly set the path to the root of the work tree instead of assuming the nearest parent directory with a .git repository. SEE ALSO
bash(1), git(1), git-config(1),http://github.com/rtomayko/git-sh Ryan Tomayko March 2010 GIT-SH(1)