Sponsored Content
Top Forums Shell Programming and Scripting Please explain below PS1 variable Post 302433034 by sunilmenhdiratt on Monday 28th of June 2010 09:08:37 AM
Old 06-28-2010
Thanks Buddy!Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Very simple question about changing PS1 variable at startup!

Hello there ! I am new in this Unix world and just start learning Unix. I have very simple question about changing PS1 variable (Shell Prompt) i have local.profile file in my working directory, i open in vi edit mode and add this line PS1="Hello:>" and i save that file. I disconnected from... (2 Replies)
Discussion started by: abidmalik
2 Replies

2. UNIX for Advanced & Expert Users

PS1 variable

I want to set my prompt to something more descriptive than a plain old $, so I set the PS1 variable as such: PS1="" Which changes the prompt correctly, but when I change directories, it does not update the prompt. So I tried this: PS1="`pwd`>" I get the same results when changing... (2 Replies)
Discussion started by: dangral
2 Replies

3. UNIX for Dummies Questions & Answers

setting PS1 variable

Hi, I am trying to set my current prompt with the current directory iam working on by $PS1=$PWD but it is blank. please help. (4 Replies)
Discussion started by: papachi
4 Replies

4. Shell Programming and Scripting

"BOLD" printing a variable in PS1 command

I would like to "BOLD" print the hostname in the following statement: export PS1=$USER"@"$(hostname -s):'$PWD>' Is there a special character I can put before and after the variable to make it bold or blinking? Thanks. (4 Replies)
Discussion started by: pdtak
4 Replies

5. UNIX for Dummies Questions & Answers

Finding files that midify the PS1 variable.

Any help developing a command to find all files on the system named ".bashrc" that modify the PS1 variable. I wanna list the full file name, including the full path, and protection. Nothing else. (2 Replies)
Discussion started by: raidkridley
2 Replies

6. Shell Programming and Scripting

.bashrc files modifying the PS1 variable?

Is there a command for finding all files on the system named ".bashrc" that modify the PS1 variable? I'd like to list the full file name(s) and the protection (including the full path). (5 Replies)
Discussion started by: raidkridley
5 Replies

7. Solaris

problem in setting PS1 variable

Hi I have set PS1 in my profile as - PS1='${LOGNAME}@${PWD}>' ; export PS1 it works fine if I am in bash/ksh shell, but as soon as i switch to bourn shell (sh) then it shows "${LOGNAME}@${PWD}>" as prompt. It is also not working in csh. Please help. (3 Replies)
Discussion started by: sanjay1979
3 Replies

8. UNIX for Dummies Questions & Answers

Setting PS1

I have set PSI for my prompt using the following command: PS1="${debian_chroot:+($debian_chroot)}\\u@\h:\\\w\a]\ "which produces chrisd@pguk:~]I want to include [ in the beginning but cannot understand the way to do this. Also I want to show only the current directory, not the whole... (4 Replies)
Discussion started by: kristinu
4 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Help needed to have changing value to the command prompt string variable PS1

Hi, I am using git bash terminal window to do git operations. I have set the prompt string variable PS1 in the ~/.bashrc file as follows: export PS1=" " This is intended to show me the current git branch's name which is active as part of the prompt string. But, the problem is when I do a git... (2 Replies)
Discussion started by: royalibrahim
2 Replies

10. UNIX for Dummies Questions & Answers

setting the PS1 variable

Hi i'm new to unix, can anyone assist in me setting the PS1 variable in unix (3 Replies)
Discussion started by: user@123
3 Replies
Method::Signatures::Modifiers(3pm)			User Contributed Perl Documentation			Method::Signatures::Modifiers(3pm)

NAME
Method::Signatures::Modifiers - use Method::Signatures from within MooseX::Declare SYNOPSIS
use MooseX::Declare; use Method::Signatures::Modifiers; class Foo { method bar (Int $thing) { # this method is declared with Method::Signatures instead of MooseX::Method::Signatures } } # -- OR -- use MooseX::Declare; class My::Declare extends MooseX::Declare { use Method::Signatures::Modifiers; } # ... later ... use My::Declare; class Fizz { method baz (Int $thing) { # this method also declared with Method::Signatures instead of MooseX::Method::Signatures } } DESCRIPTION
Allows you to use Method::Signatures from within MooseX::Declare, both for the "method" keyword and also for any method modifiers ("before", "after", "around", "override", and "augment"). Typically method signatures within MooseX::Declare are provided by MooseX::Method::Signatures. Using Method::Signatures instead provides several advantages: o MooseX::Method::Signatures has a known bug with Perl 5.12.x which does not plague Method::Signatures. o Method::Signatures may provide substantially better performance when calling methods, depending on your circumstances. o Method::Signatures error messages are somewhat easier to read (and can be overridden more easily). However, Method::Signatures cannot be considered a drop-in replacement for MooseX::Method::Signatures. Specifically, the following features of MooseX::Method::Signatures are not available to you (or work differently) if you substitute Method::Signatures: Types for Invocants MooseX::Method::Signatures allows code such as this: method foo (ClassName $class: Int $bar) { } Method::Signatures does not allow you to specify a type for the invocant, so your code would change to: method foo ($class: Int $bar) { } "where" Constraints MooseX::Method::Signatures allows code like this: # only allow even integers method foo (Int $bar where { $_ % 2 == 0 }) { } Method::Signatures does not currently allow this, although it is a planned feature for a future release. Parameter Aliasing (Labels) MooseX::Method::Signatures allows code like this: # call this as $obj->foo(bar => $baz) method foo (Int :bar($baz)) { } This feature is not currently planned for Method::Signatures. Placeholders MooseX::Method::Signatures allows code like this: method foo (Int $bar, $, Int $baz)) { # second parameter not available as a variable here } This feature is not currently planned for Method::Signatures. Traits In MooseX::Method::Signatures, "does" is a synonym for "is". Method::Signatures does not honor this. Method::Signatures supports several traits that MooseX::Method::Signatures does not. MooseX::Method::Signatures supports the "coerce" trait. Method::Signatures does not currently support this, although it is a planned feature for a future release, potentially using the "does coerce" syntax. BUGS, CAVEATS and NOTES Note that although this module causes all calls to MooseX::Method::Signatures from within MooseX::Declare to be completely replaced by calls to Method::Signatures (or calls to Method::Signatures::Modifiers), MooseX::Method::Signatures is still loaded by MooseX::Declare. It's just never used. The "compile_at_BEGIN" flag to Method::Signatures is ignored by Method::Signatures::Modifiers. This is because parsing at compile-time can cause method modifiers to be added before the methods they are modifying are composed into the Moose classes. Parsing of methods at run- time is compatible with MooseX::Method::Signatures. THANKS
This code was written by Buddy Burden (barefootcoder). The import code for replacing MooseX::Method::Signatures is based on a suggestion from Nick Perez. LICENSE
Copyright 2011 by Michael G Schwern <schwern@pobox.com>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html SEE ALSO
MooseX::Declare, Method::Signatures, MooseX::Method::Signatures. perl v5.14.2 2012-06-03 Method::Signatures::Modifiers(3pm)
All times are GMT -4. The time now is 03:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy